|
@@ -50,14 +50,14 @@ class SendNoticeJobs implements ShouldQueue
|
|
|
$company_id = $this->message_data['company_id'];
|
|
$company_id = $this->message_data['company_id'];
|
|
|
$SubNoticeLogModel = new SubNoticeLogModel();
|
|
$SubNoticeLogModel = new SubNoticeLogModel();
|
|
|
$now_time = time();
|
|
$now_time = time();
|
|
|
- $start_time = $now_time - 300; // 5分钟前
|
|
|
|
|
|
|
+ $start_time = $now_time - 1800; // 30分钟前
|
|
|
$delay_time = $now_time - 0; // 0分钟前
|
|
$delay_time = $now_time - 0; // 0分钟前
|
|
|
|
|
|
|
|
$sub_notice_list = $SubNoticeLogModel->where('company_id', $company_id)
|
|
$sub_notice_list = $SubNoticeLogModel->where('company_id', $company_id)
|
|
|
->where('push_time', '=', $now_time) // 正好当前时间
|
|
->where('push_time', '=', $now_time) // 正好当前时间
|
|
|
->orWhere(function($query) use ($delay_time, $start_time) {
|
|
->orWhere(function($query) use ($delay_time, $start_time) {
|
|
|
$query->where('push_time', '<', $delay_time)
|
|
$query->where('push_time', '<', $delay_time)
|
|
|
- ->where('push_time', '>=', $start_time); // 只查询0-5分钟内的
|
|
|
|
|
|
|
+ ->where('push_time', '>=', $start_time); // 只查询0-30分钟内的
|
|
|
})
|
|
})
|
|
|
->get()
|
|
->get()
|
|
|
->toarray();
|
|
->toarray();
|