作者 刘锟

update

@@ -76,7 +76,7 @@ class DomainInfo extends Command @@ -76,7 +76,7 @@ class DomainInfo extends Command
76 $end_day = date('Y-m-d H:i:s', strtotime('+1 month'));//域名1月后到期 76 $end_day = date('Y-m-d H:i:s', strtotime('+1 month'));//域名1月后到期
77 $list = $domainModel->where('status', '=', 1)->get(); 77 $list = $domainModel->where('status', '=', 1)->get();
78 foreach ($list as $v) { 78 foreach ($list as $v) {
79 - $project_info = $projectModel->read(['id' => $v['project_id'], 'type' => ['!=', Project::TYPE_CLOSE]], ['serve_id', 'project_type']); 79 + $project_info = $projectModel->read(['id' => $v['project_id'], 'type' => ['!=', Project::TYPE_CLOSE]], ['serve_id', 'project_type', 'is_analysis']);
80 if (!$project_info) { 80 if (!$project_info) {
81 continue; 81 continue;
82 } 82 }
@@ -91,16 +91,18 @@ class DomainInfo extends Command @@ -91,16 +91,18 @@ class DomainInfo extends Command
91 $host_array = explode('.', $host); 91 $host_array = explode('.', $host);
92 92
93 //判断是否解析泛域名,并更改项目泛域名解析状态 93 //判断是否解析泛域名,并更改项目泛域名解析状态
94 - $host_array_any = $host_array;  
95 - if (count($host_array_any) <= 2) {  
96 - array_unshift($host_array_any, '*');  
97 - } else {  
98 - $host_array_any[0] = '*';  
99 - }  
100 - $any_domain = implode('.', $host_array_any);  
101 - $rand_str = generateRandomString(3);  
102 - if (check_domain_record(str_replace('*', $rand_str, $any_domain), $servers_ip_info)) {  
103 - $projectModel->edit(['is_analysis' => 1], ['id' => $v['project_id']]); 94 + if($project_info['is_analysis'] == 0){
  95 + $host_array_any = $host_array;
  96 + if (count($host_array_any) <= 2) {
  97 + array_unshift($host_array_any, '*');
  98 + } else {
  99 + $host_array_any[0] = '*';
  100 + }
  101 + $any_domain = implode('.', $host_array_any);
  102 + $rand_str = generateRandomString(3);
  103 + if (check_domain_record(str_replace('*', $rand_str, $any_domain), $servers_ip_info)) {
  104 + $projectModel->edit(['is_analysis' => 1], ['id' => $v['project_id']]);
  105 + }
104 } 106 }
105 107
106 if ($servers_ip_info['servers_id'] == ServerConfig::SELF_SITE_ID) { 108 if ($servers_ip_info['servers_id'] == ServerConfig::SELF_SITE_ID) {