|
...
|
...
|
@@ -403,17 +403,19 @@ class OptimizeController extends BaseController |
|
|
|
public function setAiVideo(){
|
|
|
|
$this->request->validate([
|
|
|
|
'project_id'=>'required',
|
|
|
|
'status'=>'required',
|
|
|
|
],[
|
|
|
|
'project_id.required' => 'project_id不能为空',
|
|
|
|
'status.required' => '状态不能为空',
|
|
|
|
]);
|
|
|
|
$keywordVideoModel = new KeywordVideoTask();
|
|
|
|
$info = $keywordVideoModel->read(['project_id'=>$this->param['project_id']]);
|
|
|
|
if($info === false){
|
|
|
|
$this->response('请先创建视频任务,才能开启',Code::SYSTEM_ERROR);
|
|
|
|
}
|
|
|
|
$keywordVideoModel->edit(['status'=>1],['project_id'=>$this->param['project_id']]);
|
|
|
|
$keywordVideoModel->edit(['status'=>$this->param['status']],['project_id'=>$this->param['project_id']]);
|
|
|
|
$optimizeModel = new DeployOptimize();
|
|
|
|
$optimizeModel->edit(['ai_video'=>1],['project_id'=>$this->param['project_id']]);
|
|
|
|
$optimizeModel->edit(['ai_video'=>$this->param['status']],['project_id'=>$this->param['project_id']]);
|
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|