|
...
|
...
|
@@ -982,17 +982,17 @@ class RelayInquiry extends Command |
|
|
|
$inquiry_date = Carbon::make($inquiry_date);
|
|
|
|
//当天的
|
|
|
|
if($inquiry_date->isToday()){
|
|
|
|
//广告投放日(周一、二、三) 第一封询盘100%及时推送
|
|
|
|
$is_first = false;
|
|
|
|
if(in_array($inquiry_date->weekday(), [1,2,3])) {
|
|
|
|
//广告投放日(周一、二、三、四) 第一封询盘100%及时推送
|
|
|
|
$is_timely = true; //是否及时推送
|
|
|
|
if(in_array($inquiry_date->weekday(), [1,2,3,4])) {
|
|
|
|
//是否今天的第一封询盘
|
|
|
|
$detail = ReInquiryDetail::where('re_website', $domain)->where('start_at', '>=', $inquiry_date->startOfDay()->toDatetimeString())->first();
|
|
|
|
if(!$detail){
|
|
|
|
$is_first = true;
|
|
|
|
if($detail){
|
|
|
|
$is_timely = false; //只有周一到周四的非第一封询盘 根据概率及时推送
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//非广告投放日第一封询盘
|
|
|
|
if(!$is_first && $task->second_push_rate != 100){
|
|
|
|
//概率及时推送
|
|
|
|
if(!$is_timely && $task->second_push_rate != 100){
|
|
|
|
//按概率
|
|
|
|
$res = $this->get_rand([$task->second_push_rate, 100 - $task->second_push_rate]);
|
|
|
|
if($res == 1){
|
...
|
...
|
|