作者 lyh

gx数据

@@ -250,7 +250,7 @@ class ProjectLogic extends BaseLogic @@ -250,7 +250,7 @@ class ProjectLogic extends BaseLogic
250 public function createAuthor($project_id,$mch_id,$key){ 250 public function createAuthor($project_id,$mch_id,$key){
251 //查看当前项目是否已经创建了作者 251 //查看当前项目是否已经创建了作者
252 $aiBlogTaskModel = new AiBlogTask(); 252 $aiBlogTaskModel = new AiBlogTask();
253 - $count = $aiBlogTaskModel->counts(['project_id'=>$project_id]); 253 + $count = $aiBlogTaskModel->counts(['project_id'=>$project_id,'type' => 1]);
254 if($count > 0){ 254 if($count > 0){
255 return true; 255 return true;
256 } 256 }
@@ -259,6 +259,7 @@ class ProjectLogic extends BaseLogic @@ -259,6 +259,7 @@ class ProjectLogic extends BaseLogic
259 $aiBlogService->key = $key; 259 $aiBlogService->key = $key;
260 $result = $aiBlogService->createAuthor(); 260 $result = $aiBlogService->createAuthor();
261 if($result['status'] == 200){ 261 if($result['status'] == 200){
  262 + //查看当前是否已有未执行的
262 $aiBlogTaskModel->add(['project_id'=>$project_id,'status'=>1,'type'=>1]); 263 $aiBlogTaskModel->add(['project_id'=>$project_id,'status'=>1,'type'=>1]);
263 } 264 }
264 return true; 265 return true;