作者 赵彬吉

update

@@ -996,14 +996,16 @@ class RelayInquiry extends Command @@ -996,14 +996,16 @@ class RelayInquiry extends Command
996 //按概率 996 //按概率
997 $res = $this->get_rand([$task->second_push_rate, 100 - $task->second_push_rate]); 997 $res = $this->get_rand([$task->second_push_rate, 100 - $task->second_push_rate]);
998 if($res == 1){ 998 if($res == 1){
999 - $this->output('非广告投放日第一封询盘 概率' . (100 - $task->second_push_rate) . '%延迟推送');  
1000 //随机分配到未投放广告日期 999 //随机分配到未投放广告日期
1001 $now = Carbon::now(); 1000 $now = Carbon::now();
1002 // 随机开始时间(本周四或现在) 1001 // 随机开始时间(本周四或现在)
1003 $startTime = max($now->timestamp, $now->startOfWeek(4)->timestamp); 1002 $startTime = max($now->timestamp, $now->startOfWeek(4)->timestamp);
1004 1003
1005 $random = mt_rand($startTime, $now->endOfWeek()->timestamp); 1004 $random = mt_rand($startTime, $now->endOfWeek()->timestamp);
1006 - return $random - $now->timestamp; 1005 +
  1006 + $delay = $random - time();
  1007 + $this->output('非广告投放日第一封询盘 概率' . (100 - $task->second_push_rate) . '%延迟推送' . $delay);
  1008 + return $delay;
1007 } 1009 }
1008 } 1010 }
1009 } 1011 }
@@ -459,7 +459,7 @@ class SyncSubmitTaskService @@ -459,7 +459,7 @@ class SyncSubmitTaskService
459 preg_match('/^[a-zA-Z]+$/', $data['data']['message']) && 459 preg_match('/^[a-zA-Z]+$/', $data['data']['message']) &&
460 preg_match('/^\d+$/', $data['data']['phone']) && 460 preg_match('/^\d+$/', $data['data']['phone']) &&
461 strlen($data['data']['phone']) == 10 && 461 strlen($data['data']['phone']) == 10 &&
462 - $data['country'] == '荷兰' 462 + in_array($data['country'], ['荷兰', '俄罗斯'])
463 ){ 463 ){
464 throw new InquiryFilterException( '全局过滤'); 464 throw new InquiryFilterException( '全局过滤');
465 } 465 }