作者 刘锟

Merge remote-tracking branch 'origin/master' into akun

@@ -43,7 +43,7 @@ class RemainDay extends Command @@ -43,7 +43,7 @@ class RemainDay extends Command
43 * @var 暂停的项目 43 * @var 暂停的项目
44 */ 44 */
45 protected $ceaseProjectId = [ 45 protected $ceaseProjectId = [
46 - 354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250, 2193, 2399, 1685, 3931,2273,3647 46 + 354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250, 2193, 2399, 1685, 3931,2273,3647,1934
47 ];//需要单独处理的项目 47 ];//需要单独处理的项目
48 /** 48 /**
49 * The console command description. 49 * The console command description.
@@ -208,7 +208,7 @@ class ProjectLogic extends BaseLogic @@ -208,7 +208,7 @@ class ProjectLogic extends BaseLogic
208 $this->fail('保存失败,请联系管理员'); 208 $this->fail('保存失败,请联系管理员');
209 } 209 }
210 } 210 }
211 - return $this->success(); 211 + return $this->success($this->param);
212 } 212 }
213 213
214 /** 214 /**
@@ -440,7 +440,7 @@ class ProjectLogic extends BaseLogic @@ -440,7 +440,7 @@ class ProjectLogic extends BaseLogic
440 foreach ($param['payment']['renewal_record'] as &$record) { 440 foreach ($param['payment']['renewal_record'] as &$record) {
441 if (!is_null($record['expire_at'] ?? null) && $record['expire_at'] === $maxExpireAt) { 441 if (!is_null($record['expire_at'] ?? null) && $record['expire_at'] === $maxExpireAt) {
442 // 如果 end_time 不存在或与 expire_at 不一致,则更新 442 // 如果 end_time 不存在或与 expire_at 不一致,则更新
443 - if (!isset($record['end_time']) || $record['end_time'] != $record['expire_at']) { 443 + if (!isset($record['end_time']) || ($record['end_time'] != $record['expire_at'])) {
444 $record['end_time'] = $record['expire_at']; // ✅ 写回原数据 444 $record['end_time'] = $record['expire_at']; // ✅ 写回原数据
445 // 重新计算剩余天数 445 // 重新计算剩余天数
446 $diff = (strtotime($record['expire_at']) - strtotime(date('Y-m-d'))) / (60 * 60 * 24); 446 $diff = (strtotime($record['expire_at']) - strtotime(date('Y-m-d'))) / (60 * 60 * 24);
@@ -555,7 +555,7 @@ class RankDataLogic extends BaseLogic @@ -555,7 +555,7 @@ class RankDataLogic extends BaseLogic
555 $without_extension_project_ids = [658]; //是否达标只统计主词的 555 $without_extension_project_ids = [658]; //是否达标只统计主词的
556 $extension_project_ids = [354]; //扩展词也到达标的 556 $extension_project_ids = [354]; //扩展词也到达标的
557 $compliance_project_ids = [2163,257,823,1750,497,1006]; //直接达标处理的 557 $compliance_project_ids = [2163,257,823,1750,497,1006]; //直接达标处理的
558 - $ceaseProjectId = [354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250,2193,2399,1685, 3931,2273,3647];//暂停的项目 558 + $ceaseProjectId = [354, 378, 649, 1226, 1283, 1703, 1893, 2066, 2250,2193,2399,1685, 3931,2273,3647,1934];//暂停的项目
559 $uptimeProjectId = [1434,1812,276,2414,2974];//按上线时间统计的项目 559 $uptimeProjectId = [1434,1812,276,2414,2974];//按上线时间统计的项目
560 //一个项目多个api_no 560 //一个项目多个api_no
561 $multiple_api_no_project_ids = [ 561 $multiple_api_no_project_ids = [
@@ -463,7 +463,33 @@ class SyncSubmitTaskService @@ -463,7 +463,33 @@ class SyncSubmitTaskService
463 ){ 463 ){
464 throw new InquiryFilterException( '全局过滤'); 464 throw new InquiryFilterException( '全局过滤');
465 } 465 }
  466 + //全局过滤 ip 荷兰 有name、phone、email字段,但都是空
  467 + if(
  468 + in_array($data['country'], ['荷兰', '俄罗斯']) &&
  469 + isset($data['data']['name']) &&
  470 + isset($data['data']['phone']) &&
  471 + isset($data['data']['email']) &&
  472 + empty($data['data']['name']) &&
  473 + empty($data['data']['phone']) &&
  474 + empty($data['data']['email'])
  475 + ){
  476 + throw new InquiryFilterException( '全局过滤');
  477 + }
466 478
  479 + //数据都是空的
  480 + $is_all_empty = true;
  481 + foreach ($data['data'] as $item){
  482 + if(Str::startsWith(strtolower($item),'globalso-')){
  483 + continue;
  484 + }
  485 + if(!empty($item)){
  486 + $is_all_empty = false;
  487 + break;
  488 + }
  489 + }
  490 + if($is_all_empty){
  491 + throw new InquiryFilterException( '数据都是空的');
  492 + }
467 493
468 $config = InquiryFilterConfig::getCacheInfoByProjectId($project_id); 494 $config = InquiryFilterConfig::getCacheInfoByProjectId($project_id);
469 //没配置 则默认开启且使用全局 495 //没配置 则默认开启且使用全局