正在显示
1 个修改的文件
包含
4 行增加
和
2 行删除
| @@ -403,17 +403,19 @@ class OptimizeController extends BaseController | @@ -403,17 +403,19 @@ class OptimizeController extends BaseController | ||
| 403 | public function setAiVideo(){ | 403 | public function setAiVideo(){ |
| 404 | $this->request->validate([ | 404 | $this->request->validate([ |
| 405 | 'project_id'=>'required', | 405 | 'project_id'=>'required', |
| 406 | + 'status'=>'required', | ||
| 406 | ],[ | 407 | ],[ |
| 407 | 'project_id.required' => 'project_id不能为空', | 408 | 'project_id.required' => 'project_id不能为空', |
| 409 | + 'status.required' => '状态不能为空', | ||
| 408 | ]); | 410 | ]); |
| 409 | $keywordVideoModel = new KeywordVideoTask(); | 411 | $keywordVideoModel = new KeywordVideoTask(); |
| 410 | $info = $keywordVideoModel->read(['project_id'=>$this->param['project_id']]); | 412 | $info = $keywordVideoModel->read(['project_id'=>$this->param['project_id']]); |
| 411 | if($info === false){ | 413 | if($info === false){ |
| 412 | $this->response('请先创建视频任务,才能开启',Code::SYSTEM_ERROR); | 414 | $this->response('请先创建视频任务,才能开启',Code::SYSTEM_ERROR); |
| 413 | } | 415 | } |
| 414 | - $keywordVideoModel->edit(['status'=>1],['project_id'=>$this->param['project_id']]); | 416 | + $keywordVideoModel->edit(['status'=>$this->param['status']],['project_id'=>$this->param['project_id']]); |
| 415 | $optimizeModel = new DeployOptimize(); | 417 | $optimizeModel = new DeployOptimize(); |
| 416 | - $optimizeModel->edit(['ai_video'=>1],['project_id'=>$this->param['project_id']]); | 418 | + $optimizeModel->edit(['ai_video'=>$this->param['status']],['project_id'=>$this->param['project_id']]); |
| 417 | $this->response('success'); | 419 | $this->response('success'); |
| 418 | } | 420 | } |
| 419 | } | 421 | } |
-
请 注册 或 登录 后发表评论