diff --git a/app/Jobs/CloseBaccaratRoundJob.php b/app/Jobs/CloseBaccaratRoundJob.php index 6a03e2b..797892c 100644 --- a/app/Jobs/CloseBaccaratRoundJob.php +++ b/app/Jobs/CloseBaccaratRoundJob.php @@ -225,10 +225,12 @@ class CloseBaccaratRoundJob implements ShouldQueue broadcast(new MessageSent(1, $msg)); SaveMessageJob::dispatch($msg); - // 触发微信机器人消息推送 (百家乐结果) + // 触发微信机器人消息推送 (百家乐结果,无人参与时不推送微信群防止刷屏) try { - $wechatService = new \App\Services\WechatBot\WechatNotificationService; - $wechatService->notifyBaccaratResult($content); + if (!empty($winners) || !empty($losers)) { + $wechatService = new \App\Services\WechatBot\WechatNotificationService; + $wechatService->notifyBaccaratResult($content); + } } catch (\Exception $e) { \Illuminate\Support\Facades\Log::error('WechatBot baccarat notification failed', ['error' => $e->getMessage()]); }