正在显示
1 个修改的文件
包含
4 行增加
和
4 行删除
| @@ -997,13 +997,13 @@ class RelayInquiry extends Command | @@ -997,13 +997,13 @@ class RelayInquiry extends Command | ||
| 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 | //随机分配到未投放广告日期 | 999 | //随机分配到未投放广告日期 |
| 1000 | - $now = Carbon::now(); | 1000 | + $now = time(); |
| 1001 | // 随机开始时间(本周四或现在) | 1001 | // 随机开始时间(本周四或现在) |
| 1002 | - $startTime = max($now->timestamp, $now->startOfWeek(4)->timestamp); | 1002 | + $startTime = max($now, strtotime('next monday')); |
| 1003 | 1003 | ||
| 1004 | - $random = mt_rand($startTime, $now->endOfWeek()->timestamp); | 1004 | + $random = mt_rand($startTime, strtotime('this thursday')); |
| 1005 | 1005 | ||
| 1006 | - $delay = $random - time(); | 1006 | + $delay = $random - $now; |
| 1007 | $this->output('非广告投放日第一封询盘 概率' . (100 - $task->second_push_rate) . '%延迟推送' . $delay); | 1007 | $this->output('非广告投放日第一封询盘 概率' . (100 - $task->second_push_rate) . '%延迟推送' . $delay); |
| 1008 | return $delay; | 1008 | return $delay; |
| 1009 | } | 1009 | } |
-
请 注册 或 登录 后发表评论