作者 李宇航

合并分支 'master-server' 到 'master'

Master server



查看合并请求 !1216
@@ -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 }
@@ -78,7 +78,7 @@ class AiBlogListTask extends Command @@ -78,7 +78,7 @@ class AiBlogListTask extends Command
78 $aiBlogListModel = new AiBlogList(); 78 $aiBlogListModel = new AiBlogList();
79 if(!empty($saveData)){ 79 if(!empty($saveData)){
80 //写一条路由信息 80 //写一条路由信息
81 - RouteMap::setRoute('ai_blogs',RouteMap::SOURCE_AI_BLOG_LIST,0,$v['project_id']); 81 + RouteMap::setRoute('top_blog',RouteMap::SOURCE_AI_BLOG_LIST,0,$v['project_id']);
82 $aiBlogListModel->truncate(); 82 $aiBlogListModel->truncate();
83 $aiBlogListModel->insertAll($saveData); 83 $aiBlogListModel->insertAll($saveData);
84 } 84 }