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