作者 lyh

Merge branch 'master' of http://47.244.231.31:8099/zhl/globalso-v6 into lyh-server

@@ -771,7 +771,7 @@ class RelayInquiry extends Command @@ -771,7 +771,7 @@ class RelayInquiry extends Command
771 */ 771 */
772 public function getInquiry($num = 10) 772 public function getInquiry($num = 10)
773 { 773 {
774 - $result = ReInquiryForm::where(['status' => ReInquiryForm::STATUS_INIT])->where('created_at', '>', '2025-04-27 00:00:00')->orderBy('id', 'asc')->limit($num)->get(); 774 + $result = ReInquiryForm::where(['status' => ReInquiryForm::STATUS_INIT])->where('created_at', '>', '2025-05-22 18:00:00')->orderBy('id', 'asc')->limit($num)->get();
775 return $result; 775 return $result;
776 } 776 }
777 777
@@ -159,7 +159,7 @@ class NoticeController extends BaseController @@ -159,7 +159,7 @@ class NoticeController extends BaseController
159 159
160 //新增重定向任务 160 //新增重定向任务
161 $redirect_model = new DomainRedirectTask(); 161 $redirect_model = new DomainRedirectTask();
162 - $task_redirect_info = $redirect_model->read(['origin_domain'=>$origin_domain],['id']); 162 + $task_redirect_info = $redirect_model->read(['origin_domain'=>$origin_domain],['id','status']);
163 if(!$task_redirect_info){ 163 if(!$task_redirect_info){
164 $redirect_model->add([ 164 $redirect_model->add([
165 'origin_domain'=> $origin_domain, 165 'origin_domain'=> $origin_domain,
@@ -167,7 +167,9 @@ class NoticeController extends BaseController @@ -167,7 +167,9 @@ class NoticeController extends BaseController
167 'target_domain' => $target_domain 167 'target_domain' => $target_domain
168 ]); 168 ]);
169 }else{ 169 }else{
170 - $redirect_model->edit(['status'=>DomainRedirectTask::STATUS_UN],['id'=>$task_redirect_info['id']]); 170 + if($task_redirect_info['status'] == DomainRedirectTask::STATUS_FAL){
  171 + $redirect_model->edit(['status'=>DomainRedirectTask::STATUS_UN,'error_msg'=>null],['id'=>$task_redirect_info['id']]);
  172 + }
171 } 173 }
172 174
173 return $this->success(); 175 return $this->success();
@@ -291,7 +291,7 @@ class OptimizationReportController extends BaseController @@ -291,7 +291,7 @@ class OptimizationReportController extends BaseController
291 //复制站点域名 291 //复制站点域名
292 $ext_projects = $this->getExtendProjects(); 292 $ext_projects = $this->getExtendProjects();
293 $flg_ext = $this->getExtFlag($ext_projects, $domain, $api_no); 293 $flg_ext = $this->getExtFlag($ext_projects, $domain, $api_no);
294 - $ext_domain = str_replace('www.', '', $this->getExtendProjects($api_no)['ext'] ?? '');//关联域名 294 + $ext_domain = explode(',', str_replace('www.', '', $this->getExtendProjects($api_no)['ext'] ?? ''));//关联域名
295 //关联域名 295 //关联域名
296 $relate_domain = str_replace('www.', '', InquiryRelateDomain::getRelateDomain($domain, 'globalso_domain')); 296 $relate_domain = str_replace('www.', '', InquiryRelateDomain::getRelateDomain($domain, 'globalso_domain'));
297 //AI站点域名 297 //AI站点域名
@@ -316,11 +316,11 @@ class OptimizationReportController extends BaseController @@ -316,11 +316,11 @@ class OptimizationReportController extends BaseController
316 $domain_text = 'AI域名:' . $last['r']; 316 $domain_text = 'AI域名:' . $last['r'];
317 if (in_array($flg_ext, [1, 2]) || $flg_ai == 1) { 317 if (in_array($flg_ext, [1, 2]) || $flg_ai == 1) {
318 if ($last['r'] == $ai_domain) { 318 if ($last['r'] == $ai_domain) {
319 - $domain_text = '星链域名:' . $ai_domain;  
320 - } else if ($last['r'] == $ext_domain) {  
321 - $domain_text = '主域名2:' . $ext_domain; 319 + $domain_text = '星链域名:' . $last['r'];
  320 + } else if (in_array($last['r'], $ext_domain)) {
  321 + $domain_text = '主域名2:' . $last['r'];
322 } else if ($last['r'] == $relate_domain) { 322 } else if ($last['r'] == $relate_domain) {
323 - $domain_text = '主域名2:' . $relate_domain; 323 + $domain_text = '主域名2:' . $last['r'];
324 } else { 324 } else {
325 $domain_text = 'AI域名:' . $last['r']; 325 $domain_text = 'AI域名:' . $last['r'];
326 } 326 }
@@ -340,13 +340,17 @@ class DomainInfoLogic extends BaseLogic @@ -340,13 +340,17 @@ class DomainInfoLogic extends BaseLogic
340 //新增重定向任务 340 //新增重定向任务
341 $redirect_model = new DomainRedirectTask(); 341 $redirect_model = new DomainRedirectTask();
342 if($domain_301){ 342 if($domain_301){
343 - $task_redirect_info = $redirect_model->read(['origin_domain'=>$domain_301]); 343 + $task_redirect_info = $redirect_model->read(['origin_domain'=>$domain_301],['id','status']);
344 if(!$task_redirect_info){ 344 if(!$task_redirect_info){
345 $redirect_model->add([ 345 $redirect_model->add([
346 'origin_domain'=> $domain_301, 346 'origin_domain'=> $domain_301,
347 'other_domain' => json_encode([]), 347 'other_domain' => json_encode([]),
348 'target_domain' => $info['domain'] 348 'target_domain' => $info['domain']
349 ]); 349 ]);
  350 + }else{
  351 + if($task_redirect_info['status'] == DomainRedirectTask::STATUS_FAL){
  352 + $redirect_model->edit(['status'=>DomainRedirectTask::STATUS_UN,'error_msg'=>null],['id'=>$task_redirect_info['id']]);
  353 + }
350 } 354 }
351 } 355 }
352 356
@@ -235,7 +235,7 @@ class RankDataLogic extends BaseLogic @@ -235,7 +235,7 @@ class RankDataLogic extends BaseLogic
235 //复制站点域名 235 //复制站点域名
236 $ext_projects = $this->getExtendProjects(); 236 $ext_projects = $this->getExtendProjects();
237 $flg_ext = $this->getExtFlag($ext_projects, $domain, $api_no); 237 $flg_ext = $this->getExtFlag($ext_projects, $domain, $api_no);
238 - $ext_domain = str_replace('www.', '', $this->getExtendProjects($api_no)['ext'] ?? ''); 238 + $ext_domain = explode(',', str_replace('www.', '', $this->getExtendProjects($api_no)['ext'] ?? ''));//关联域名
239 $main_domain = str_replace('www.', '', $this->getExtendProjects($api_no)['url'] ?? ''); 239 $main_domain = str_replace('www.', '', $this->getExtendProjects($api_no)['url'] ?? '');
240 //关联域名 240 //关联域名
241 $relate_domain = str_replace('www.', '', InquiryRelateDomain::getRelateDomain($domain, 'globalso_domain')); 241 $relate_domain = str_replace('www.', '', InquiryRelateDomain::getRelateDomain($domain, 'globalso_domain'));
@@ -266,11 +266,11 @@ class RankDataLogic extends BaseLogic @@ -266,11 +266,11 @@ class RankDataLogic extends BaseLogic
266 $domain_text = 'AI域名:' . $last['r']; 266 $domain_text = 'AI域名:' . $last['r'];
267 if (in_array($flg_ext, [1, 2]) || $flg_ai == 1) { 267 if (in_array($flg_ext, [1, 2]) || $flg_ai == 1) {
268 if ($last['r'] == $ai_domain) { 268 if ($last['r'] == $ai_domain) {
269 - $domain_text = '星链域名:' . $ai_domain;  
270 - } else if ($last['r'] == $ext_domain) {  
271 - $domain_text = '主域名2:' . $ext_domain; 269 + $domain_text = '星链域名:' . $last['r'];
  270 + } else if (in_array($last['r'], $ext_domain)) {
  271 + $domain_text = '主域名2:' . $last['r'];
272 } else if ($last['r'] == $relate_domain) { 272 } else if ($last['r'] == $relate_domain) {
273 - $domain_text = '主域名2:' . $relate_domain; 273 + $domain_text = '主域名2:' . $last['r'];
274 } else { 274 } else {
275 $domain_text = 'AI域名:' . $last['r']; 275 $domain_text = 'AI域名:' . $last['r'];
276 } 276 }