|
...
|
...
|
@@ -81,7 +81,7 @@ class AiBlogTask extends Command |
|
|
|
$aiBlogService->task_id = $item['task_id'];
|
|
|
|
//拉取文章数据
|
|
|
|
$result = $aiBlogService->getDetail();
|
|
|
|
if(!isset($result['status'])){
|
|
|
|
if(!isset($result['status']) || ($result['status'] != 200)){
|
|
|
|
if($item['sort'] <= 5){
|
|
|
|
$aiBlogTaskModel->edit(['sort'=>$item['sort'] + 1],['id'=>$item['id']]);
|
|
|
|
}else{
|
|
...
|
...
|
@@ -91,10 +91,6 @@ class AiBlogTask extends Command |
|
|
|
echo date('Y-m-d H:i:s'). '错误信息:'.json_encode($result,true).PHP_EOL;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
if($result['status'] != 200){
|
|
|
|
echo '未拉取到数据---状态码:'.$result['status'].PHP_EOL;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
//保存当前项目ai_blog数据
|
|
|
|
ProjectServer::useProject($item['project_id']);
|
|
|
|
$aiBlogModel = new AiBlog();
|
|
...
|
...
|
@@ -120,6 +116,16 @@ class AiBlogTask extends Command |
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :g获取信息
|
|
|
|
* @name :getDetail
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/3/19 17:24
|
|
|
|
*/
|
|
|
|
public function getDetail(){
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :获取任务id
|
...
|
...
|
|