作者 刘锟

update

@@ -141,7 +141,7 @@ class DomainInfo extends Command @@ -141,7 +141,7 @@ class DomainInfo extends Command
141 $end_day = date('Y-m-d H:i:s', time() + 3 * 24 * 3600);//3天后到期 141 $end_day = date('Y-m-d H:i:s', time() + 3 * 24 * 3600);//3天后到期
142 $list = $domainModel->where('status', '=', 1)->where('type', '=', 1)->where('certificate_end_time', '<', $end_day)->get()->toArray(); 142 $list = $domainModel->where('status', '=', 1)->where('type', '=', 1)->where('certificate_end_time', '<', $end_day)->get()->toArray();
143 foreach ($list as $v) { 143 foreach ($list as $v) {
144 - $project_info = $projectModel->read(['id' => $v['project_id'], 'type' => ['!=', Project::TYPE_CLOSE]], ['serve_id']); 144 + $project_info = $projectModel->read(['id' => $v['project_id'], 'type' => ['!=', Project::TYPE_CLOSE]], ['serve_id', 'project_type']);
145 if (!$project_info) { 145 if (!$project_info) {
146 continue; 146 continue;
147 } 147 }
@@ -161,14 +161,20 @@ class DomainInfo extends Command @@ -161,14 +161,20 @@ class DomainInfo extends Command
161 continue; 161 continue;
162 } 162 }
163 163
  164 + if ($project_info['project_type'] == Project::PROJECT_TYPE_SEO) {
  165 + $type = DomainCreateTask::TYPE_BLOG;
  166 + } else {
  167 + $type = DomainCreateTask::TYPE_MAIN;
  168 + }
  169 +
164 //创建更新站点证书任务 170 //创建更新站点证书任务
165 - $task_info = $domainCreateTaskModel->read(['type' => DomainCreateTask::TYPE_MAIN, 'domain_id' => $v['id'], 'status' => ['<', DomainCreateTask::STATUS_SUC]]); 171 + $task_info = $domainCreateTaskModel->read(['type' => $type, 'domain_id' => $v['id'], 'status' => ['<', DomainCreateTask::STATUS_SUC]]);
166 if (!$task_info) { 172 if (!$task_info) {
167 $domainCreateTaskModel->add([ 173 $domainCreateTaskModel->add([
168 'server_id' => $servers_ip_info['servers_id'], 174 'server_id' => $servers_ip_info['servers_id'],
169 'project_id' => $v['project_id'], 175 'project_id' => $v['project_id'],
170 'domain_id' => $v['id'], 176 'domain_id' => $v['id'],
171 - 'type' => DomainCreateTask::TYPE_MAIN 177 + 'type' => $type
172 ]); 178 ]);
173 } 179 }
174 } 180 }