正在显示
1 个修改的文件
包含
10 行增加
和
2 行删除
| @@ -183,7 +183,7 @@ class AiBlogTask extends Command | @@ -183,7 +183,7 @@ class AiBlogTask extends Command | ||
| 183 | ProjectServer::useProject($project_id); | 183 | ProjectServer::useProject($project_id); |
| 184 | $aiSettingInfo = $this->getSetting($project_id); | 184 | $aiSettingInfo = $this->getSetting($project_id); |
| 185 | $this->output('sync: list start, project_id: ' . $project_id); | 185 | $this->output('sync: list start, project_id: ' . $project_id); |
| 186 | - $this->updateBlogList($aiSettingInfo); | 186 | + $this->updateBlogList($aiSettingInfo,$project_id); |
| 187 | $this->output('sync: list end'); | 187 | $this->output('sync: list end'); |
| 188 | //更新作者 | 188 | //更新作者 |
| 189 | $this->output('sync: author start, project_id: ' . $project_id); | 189 | $this->output('sync: author start, project_id: ' . $project_id); |
| @@ -249,7 +249,7 @@ class AiBlogTask extends Command | @@ -249,7 +249,7 @@ class AiBlogTask extends Command | ||
| 249 | * @param $aiSettingInfo | 249 | * @param $aiSettingInfo |
| 250 | * @return bool | 250 | * @return bool |
| 251 | */ | 251 | */ |
| 252 | - public function updateBlogList($aiSettingInfo){ | 252 | + public function updateBlogList($aiSettingInfo,$project_id = 0){ |
| 253 | $aiBlogService = new AiBlogService(); | 253 | $aiBlogService = new AiBlogService(); |
| 254 | $aiBlogService->mch_id = $aiSettingInfo['mch_id']; | 254 | $aiBlogService->mch_id = $aiSettingInfo['mch_id']; |
| 255 | $aiBlogService->key = $aiSettingInfo['key']; | 255 | $aiBlogService->key = $aiSettingInfo['key']; |
| @@ -257,6 +257,14 @@ class AiBlogTask extends Command | @@ -257,6 +257,14 @@ class AiBlogTask extends Command | ||
| 257 | $saveData = []; | 257 | $saveData = []; |
| 258 | $result = $aiBlogService->getAiBlogList($page,15); | 258 | $result = $aiBlogService->getAiBlogList($page,15); |
| 259 | if(!isset($result['status']) || $result['status'] != 200){ | 259 | if(!isset($result['status']) || $result['status'] != 200){ |
| 260 | + // 钉钉通知 | ||
| 261 | + $dingService = new DingService(); | ||
| 262 | + $body = [ | ||
| 263 | + 'keyword' => 'AI_BLOG列表页未生成拉取失败', | ||
| 264 | + 'msg' => '项目ID:' . $project_id . PHP_EOL . '返回信息:' . json_encode($result,JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES), | ||
| 265 | + 'isAtAll' => false, // 是否@所有人 | ||
| 266 | + ]; | ||
| 267 | + $dingService->handle($body); | ||
| 260 | return true; | 268 | return true; |
| 261 | } | 269 | } |
| 262 | $total_page = $result['data']['total_page']; | 270 | $total_page = $result['data']['total_page']; |
-
请 注册 或 登录 后发表评论