作者 赵彬吉

update

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