|
@@ -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
|
}
|