作者 lyh

gx脚本

@@ -7,6 +7,7 @@ use App\Http\Controllers\Aside\BaseController; @@ -7,6 +7,7 @@ use App\Http\Controllers\Aside\BaseController;
7 use App\Http\Logic\Aside\Ai\AiCommandLogic; 7 use App\Http\Logic\Aside\Ai\AiCommandLogic;
8 use App\Http\Requests\Aside\Ai\AiCommandRequest; 8 use App\Http\Requests\Aside\Ai\AiCommandRequest;
9 use App\Models\Ai\AiCommand as AiCommandModel; 9 use App\Models\Ai\AiCommand as AiCommandModel;
  10 +use App\Models\Project\Project;
10 11
11 /** 12 /**
12 * @remark :ai指令 13 * @remark :ai指令
@@ -28,8 +29,17 @@ class AiCommandController extends BaseController @@ -28,8 +29,17 @@ class AiCommandController extends BaseController
28 $this->map['name|key|ai'] = ['like','%'.$this->map['scene'].'%']; 29 $this->map['name|key|ai'] = ['like','%'.$this->map['scene'].'%'];
29 unset($this->map['scene']); 30 unset($this->map['scene']);
30 } 31 }
31 -  
32 $lists = $aiCommandModel->lists($this->map,$this->page,$this->row,$this->order); 32 $lists = $aiCommandModel->lists($this->map,$this->page,$this->row,$this->order);
  33 + $projectModel = new Project();
  34 + if(!empty($lists) && !empty($lists['list'])){
  35 + foreach ($lists['list'] as $k => $v){
  36 + $v['project_name'] = '';
  37 + if($v['project_id'] != 0){
  38 + $v['project_name'] = $projectModel->getProjectName($v['project_id']);
  39 + }
  40 + $lists['list'][$k] = $v;
  41 + }
  42 + }
33 $this->response('success',Code::SUCCESS,$lists); 43 $this->response('success',Code::SUCCESS,$lists);
34 } 44 }
35 45