|
@@ -53,7 +53,8 @@ class AutomaticDispatch extends Command
|
|
|
// 获取当前时间的前五分钟时间戳
|
|
// 获取当前时间的前五分钟时间戳
|
|
|
$fiveMinutesAgo = time() - 120; // 300 秒 = 2 分钟
|
|
$fiveMinutesAgo = time() - 120; // 300 秒 = 2 分钟
|
|
|
$list = ServiceWork::where('work_status',0)
|
|
$list = ServiceWork::where('work_status',0)
|
|
|
- ->where('service_status',0)
|
|
|
|
|
|
|
+ ->where('service_status',0)
|
|
|
|
|
+ ->where('work_pay_status',1)
|
|
|
->where(function ($query) use ($fiveMinutesAgo) {
|
|
->where(function ($query) use ($fiveMinutesAgo) {
|
|
|
$query->where('exec_time', 0)->whereOr('exec_time', '<', $fiveMinutesAgo);
|
|
$query->where('exec_time', 0)->whereOr('exec_time', '<', $fiveMinutesAgo);
|
|
|
})
|
|
})
|