|
...
|
...
|
@@ -72,11 +72,7 @@ class AiBlogAuthorTask extends Command |
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if(empty($result['data'])){
|
|
|
|
$aiBlogService = new AiBlogService();
|
|
|
|
$aiBlogService->mch_id = $aiSettingInfo['mch_id'];
|
|
|
|
$aiBlogService->key = $aiSettingInfo['key'];
|
|
|
|
$create_result = $aiBlogService->createAuthor();
|
|
|
|
echo '没有作者任务:创建作者任务'.json_encode($create_result,true);
|
|
|
|
echo '没有作者任务:创建作者任务'.PHP_EOL;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
//保存当前项目ai_blog数据
|
|
...
|
...
|
@@ -122,7 +118,7 @@ class AiBlogAuthorTask extends Command |
|
|
|
return true;
|
|
|
|
}
|
|
|
|
$aiBlogAuthorModel = new AiBlogAuthor();
|
|
|
|
$info = $aiBlogAuthorModel->counts(['project_id'=>$project_id]);
|
|
|
|
$info = $aiBlogAuthorModel->counts(['id'=>['!=',0]]);
|
|
|
|
if($info == 0){
|
|
|
|
echo '项目id:'.$project_id.'执行新增。'.$info;
|
|
|
|
foreach ($data as $v){
|
...
|
...
|
|