正在显示
1 个修改的文件
包含
3 行增加
和
0 行删除
| @@ -113,6 +113,8 @@ class AiBlogAuthorTask extends Command | @@ -113,6 +113,8 @@ class AiBlogAuthorTask extends Command | ||
| 113 | return true; | 113 | return true; |
| 114 | } | 114 | } |
| 115 | $aiBlogAuthorModel = new AiBlogAuthor(); | 115 | $aiBlogAuthorModel = new AiBlogAuthor(); |
| 116 | + $info = $aiBlogAuthorModel->count(['project_id'=>$project_id]); | ||
| 117 | + if($info === false){ | ||
| 116 | foreach ($data as $v){ | 118 | foreach ($data as $v){ |
| 117 | $param = [ | 119 | $param = [ |
| 118 | 'author_id'=>$v['id'], | 120 | 'author_id'=>$v['id'], |
| @@ -124,6 +126,7 @@ class AiBlogAuthorTask extends Command | @@ -124,6 +126,7 @@ class AiBlogAuthorTask extends Command | ||
| 124 | $route = RouteMap::setRoute($v['title'], RouteMap::SOURCE_AI_BLOG_AUTHOR, $id, $project_id); | 126 | $route = RouteMap::setRoute($v['title'], RouteMap::SOURCE_AI_BLOG_AUTHOR, $id, $project_id); |
| 125 | $aiBlogAuthorModel->edit(['route'=>$route],['id'=>$id]); | 127 | $aiBlogAuthorModel->edit(['route'=>$route],['id'=>$id]); |
| 126 | } | 128 | } |
| 129 | + } | ||
| 127 | return true; | 130 | return true; |
| 128 | } | 131 | } |
| 129 | } | 132 | } |
-
请 注册 或 登录 后发表评论