', date('Y-m-d H:i:s', strtotime('-2 hour'))) ->where('updated_at', '<=', date('Y-m-d H:i:s', time() - 30*60)) ->where('published', BoolEnum::YES) ->pluck('order_id') ->toArray(); if (!$orderIds) { return; } $orderIds = array_unique($orderIds); if (!$orderIds) { return; } $orderIds = Order::whereIn('id', $orderIds)->where('lottery_state', LottState::WAIT)->pluck('id')->toArray(); if (!$orderIds) { return; } foreach ($orderIds as $orderId) { $unPublishes = OrderJczqResult::where('order_id', $orderId) ->where('published', BoolEnum::NO)->count(); // 如果全部已公布,则计算奖金 if ($unPublishes == 0) { Log::error('repair-- dispatch ComputeJczqOrderPrize, orderId:'.$orderId); ComputeJczqOrderPrize::dispatch($orderId); } } } }