作者 李宇航

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

gxai



查看合并请求 !1802
@@ -120,18 +120,18 @@ class AiBlogTask extends Command @@ -120,18 +120,18 @@ class AiBlogTask extends Command
120 DB::disconnect('custom_mysql'); 120 DB::disconnect('custom_mysql');
121 return false; 121 return false;
122 } 122 }
123 - //需要更新的路由  
124 - if (!in_array($result['data']['author_id'], $this->updateProject[$item['project_id']] ?? [])) {  
125 - $this->updateProject[$item['project_id']][] = $result['data']['author_id'];  
126 - }  
127 - if (!in_array($aiBlogInfo['route'], $this->routes[$item['project_id']] ?? [])) {  
128 - $this->routes[$item['project_id']][] = $aiBlogInfo['route'];  
129 - }  
130 //拿到返回的路由查看是否重复 123 //拿到返回的路由查看是否重复
131 $route = RouteMap::setRoute($result['data']['url'], RouteMap::SOURCE_AI_BLOG, $aiBlogInfo['id'], $item['project_id']); 124 $route = RouteMap::setRoute($result['data']['url'], RouteMap::SOURCE_AI_BLOG, $aiBlogInfo['id'], $item['project_id']);
132 if($route != $result['data']['url']){ 125 if($route != $result['data']['url']){
133 $aiBlogService->updateDetail(['route'=>$route,'task_id'=>$item['task_id']]); 126 $aiBlogService->updateDetail(['route'=>$route,'task_id'=>$item['task_id']]);
134 } 127 }
  128 + //需要更新的路由
  129 + if (!in_array($result['data']['author_id'], $this->updateProject[$item['project_id']] ?? [])) {
  130 + $this->updateProject[$item['project_id']][] = $result['data']['author_id'];
  131 + }
  132 + if (!in_array($route, $this->routes[$item['project_id']] ?? [])) {
  133 + $this->routes[$item['project_id']][] = $route;
  134 + }
135 $aiBlogModel->edit(['new_title'=>$result['data']['title'], 'image'=>$result['data']['thumb'], 'text'=>$result['data']['section'], 'author_id'=>$result['data']['author_id'],'seo_title'=>$result['data']['title'],'seo_keyword'=>$result['data']['keyword'],'seo_description'=>$result['data']['description'], 'route'=>$route ,'status'=>$aiBlogModel::STATUS_FINISH], ['task_id'=>$item['task_id']]); 135 $aiBlogModel->edit(['new_title'=>$result['data']['title'], 'image'=>$result['data']['thumb'], 'text'=>$result['data']['section'], 'author_id'=>$result['data']['author_id'],'seo_title'=>$result['data']['title'],'seo_keyword'=>$result['data']['keyword'],'seo_description'=>$result['data']['description'], 'route'=>$route ,'status'=>$aiBlogModel::STATUS_FINISH], ['task_id'=>$item['task_id']]);
136 DB::disconnect('custom_mysql'); 136 DB::disconnect('custom_mysql');
137 $aiBlogTaskModel->edit(['status'=>$aiBlogModel::STATUS_FINISH],['id'=>$item['id']]); 137 $aiBlogTaskModel->edit(['status'=>$aiBlogModel::STATUS_FINISH],['id'=>$item['id']]);
@@ -4,10 +4,8 @@ namespace App\Console\Commands\Domain; @@ -4,10 +4,8 @@ namespace App\Console\Commands\Domain;
4 4
5 use App\Models\Project\DeployBuild; 5 use App\Models\Project\DeployBuild;
6 use App\Models\Project\DeployOptimize; 6 use App\Models\Project\DeployOptimize;
7 -use App\Models\Project\OnlineCheck;  
8 use App\Models\Project\Project; 7 use App\Models\Project\Project;
9 use Illuminate\Console\Command; 8 use Illuminate\Console\Command;
10 -use App\Models\Domain\DomainInfo as DomainInfoModel;  
11 9
12 /** 10 /**
13 * 剩余服务时长 11 * 剩余服务时长