作者 lyh

gx

@@ -39,6 +39,15 @@ class ServerConfigLogic extends BaseLogic @@ -39,6 +39,15 @@ class ServerConfigLogic extends BaseLogic
39 */ 39 */
40 public function serviceConfigList($map,$page,$row,$order = 'id',$filed = ['*']){ 40 public function serviceConfigList($map,$page,$row,$order = 'id',$filed = ['*']){
41 $lists = $this->model->lists($map,$page,$row,$order,$filed); 41 $lists = $this->model->lists($map,$page,$row,$order,$filed);
  42 + if(!empty($lists) && !empty($lists)){
  43 + $projectModel = new Project();
  44 + foreach ($lists['list'] as $k => $v){
  45 + if($v['type'] == $this->model::TYPE_SERVER){
  46 + $v['count'] = $projectModel->where(['serve_id'=>$v['id']])->count();
  47 + }
  48 + $lists['list'][$k] = $v;
  49 + }
  50 + }
42 return $this->success($lists); 51 return $this->success($lists);
43 } 52 }
44 53