正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -63,15 +63,14 @@ class AiBlogAuthorTask extends Command | @@ -63,15 +63,14 @@ class AiBlogAuthorTask extends Command | ||
| 63 | $aiBlogService->mch_id = $aiSettingInfo['mch_id']; | 63 | $aiBlogService->mch_id = $aiSettingInfo['mch_id']; |
| 64 | $aiBlogService->key = $aiSettingInfo['key']; | 64 | $aiBlogService->key = $aiSettingInfo['key']; |
| 65 | $result = $aiBlogService->getAuthor(); | 65 | $result = $aiBlogService->getAuthor(); |
| 66 | + echo '作者数据:'.json_encode($result,true); | ||
| 66 | if(!isset($result['status'])){ | 67 | if(!isset($result['status'])){ |
| 67 | continue; | 68 | continue; |
| 68 | } | 69 | } |
| 69 | if($result['status'] != 200){ | 70 | if($result['status'] != 200){ |
| 70 | - sleep(10); | ||
| 71 | continue; | 71 | continue; |
| 72 | } | 72 | } |
| 73 | if(empty($result['data'])){ | 73 | if(empty($result['data'])){ |
| 74 | - sleep(20); | ||
| 75 | continue; | 74 | continue; |
| 76 | } | 75 | } |
| 77 | //保存当前项目ai_blog数据 | 76 | //保存当前项目ai_blog数据 |
| @@ -119,6 +118,7 @@ class AiBlogAuthorTask extends Command | @@ -119,6 +118,7 @@ class AiBlogAuthorTask extends Command | ||
| 119 | $aiBlogAuthorModel = new AiBlogAuthor(); | 118 | $aiBlogAuthorModel = new AiBlogAuthor(); |
| 120 | $info = $aiBlogAuthorModel->counts(['project_id'=>$project_id]); | 119 | $info = $aiBlogAuthorModel->counts(['project_id'=>$project_id]); |
| 121 | if($info == 0){ | 120 | if($info == 0){ |
| 121 | + echo '项目id:'.$project_id.'执行新增。'.$info; | ||
| 122 | foreach ($data as $v){ | 122 | foreach ($data as $v){ |
| 123 | $param = [ | 123 | $param = [ |
| 124 | 'author_id'=>$v['id'], | 124 | 'author_id'=>$v['id'], |
-
请 注册 或 登录 后发表评论