作者 刘锟

update

@@ -17,7 +17,6 @@ use App\Models\Project\Project; @@ -17,7 +17,6 @@ use App\Models\Project\Project;
17 use Illuminate\Console\Command; 17 use Illuminate\Console\Command;
18 use App\Models\Domain\DomainInfo as DomainInfoModel; 18 use App\Models\Domain\DomainInfo as DomainInfoModel;
19 use Illuminate\Support\Facades\Log; 19 use Illuminate\Support\Facades\Log;
20 -use Symfony\Component\Process\Process;  
21 20
22 class DomainInfo extends Command 21 class DomainInfo extends Command
23 { 22 {
@@ -71,11 +70,15 @@ class DomainInfo extends Command @@ -71,11 +70,15 @@ class DomainInfo extends Command
71 $serverIpModel = new ServersIp(); 70 $serverIpModel = new ServersIp();
72 $list = $domainModel->where('status', '=', 1)->get(); 71 $list = $domainModel->where('status', '=', 1)->get();
73 foreach ($list as $v) { 72 foreach ($list as $v) {
74 - $project_info = $projectModel->read(['id' => $v['project_id'], 'type' => ['!=', Project::TYPE_CLOSE]], ['serve_id']); 73 + $project_info = $projectModel->read(['id' => $v['project_id'], 'type' => ['!=', Project::TYPE_CLOSE]], ['serve_id', 'project_type']);
75 if (!$project_info) { 74 if (!$project_info) {
76 continue; 75 continue;
77 } 76 }
78 77
  78 + if ($project_info['project_type'] == Project::PROJECT_TYPE_SEO) {
  79 + continue;
  80 + }
  81 +
79 $servers_ip_info = $serverIpModel->read(['id' => $project_info['serve_id']], ['servers_id', 'ip', 'domain']); 82 $servers_ip_info = $serverIpModel->read(['id' => $project_info['serve_id']], ['servers_id', 'ip', 'domain']);
80 if (!$servers_ip_info) { 83 if (!$servers_ip_info) {
81 continue; 84 continue;
@@ -142,11 +145,15 @@ class DomainInfo extends Command @@ -142,11 +145,15 @@ class DomainInfo extends Command
142 $end_day = date('Y-m-d H:i:s', time() + 3 * 24 * 3600);//3天后到期 145 $end_day = date('Y-m-d H:i:s', time() + 3 * 24 * 3600);//3天后到期
143 $list = $domainModel->where('status', '=', 1)->where('type', '!=', 2)->where('certificate_end_time', '<', $end_day)->get()->toArray(); 146 $list = $domainModel->where('status', '=', 1)->where('type', '!=', 2)->where('certificate_end_time', '<', $end_day)->get()->toArray();
144 foreach ($list as $v) { 147 foreach ($list as $v) {
145 - $project_info = $projectModel->read(['id' => $v['project_id'], 'type' => ['!=', Project::TYPE_CLOSE]], ['serve_id']); 148 + $project_info = $projectModel->read(['id' => $v['project_id'], 'type' => ['!=', Project::TYPE_CLOSE]], ['serve_id', 'project_type']);
146 if (!$project_info) { 149 if (!$project_info) {
147 continue; 150 continue;
148 } 151 }
149 152
  153 + if ($project_info['project_type'] == Project::PROJECT_TYPE_SEO) {
  154 + continue;
  155 + }
  156 +
150 $servers_ip_info = $serverIpModel->read(['id' => $project_info['serve_id']], ['servers_id', 'ip', 'domain']); 157 $servers_ip_info = $serverIpModel->read(['id' => $project_info['serve_id']], ['servers_id', 'ip', 'domain']);
151 if (!$servers_ip_info) { 158 if (!$servers_ip_info) {
152 continue; 159 continue;