|
...
|
...
|
@@ -997,13 +997,13 @@ class RelayInquiry extends Command |
|
|
|
$res = $this->get_rand([$task->second_push_rate, 100 - $task->second_push_rate]);
|
|
|
|
if($res == 1){
|
|
|
|
//随机分配到未投放广告日期
|
|
|
|
$now = Carbon::now();
|
|
|
|
$now = time();
|
|
|
|
// 随机开始时间(本周四或现在)
|
|
|
|
$startTime = max($now->timestamp, $now->startOfWeek(4)->timestamp);
|
|
|
|
$startTime = max($now, strtotime('next monday'));
|
|
|
|
|
|
|
|
$random = mt_rand($startTime, $now->endOfWeek()->timestamp);
|
|
|
|
$random = mt_rand($startTime, strtotime('this thursday'));
|
|
|
|
|
|
|
|
$delay = $random - time();
|
|
|
|
$delay = $random - $now;
|
|
|
|
$this->output('非广告投放日第一封询盘 概率' . (100 - $task->second_push_rate) . '%延迟推送' . $delay);
|
|
|
|
return $delay;
|
|
|
|
}
|
...
|
...
|
|