From 039c32ecf4e2e2f967402102e567f71453e52563 Mon Sep 17 00:00:00 2001 From: lkddi Date: Thu, 2 Apr 2026 15:14:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(wechat):=20=E7=A7=BB=E9=99=A4=E5=8F=91?= =?UTF-8?q?=E9=80=81=E9=98=9F=E5=88=97=E4=B8=AD=E5=B7=B2=E5=BA=9F=E5=BC=83?= =?UTF-8?q?=E7=9A=84=E5=85=A8=E5=B1=80=E6=80=BB=E5=BC=80=E5=85=B3=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E5=AF=BC=E8=87=B4=E6=B6=88=E6=81=AF=E8=A2=AB=E4=B8=A2?= =?UTF-8?q?=E5=BC=83=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Jobs/SendWechatBotMessage.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/app/Jobs/SendWechatBotMessage.php b/app/Jobs/SendWechatBotMessage.php index 788b496..88b5096 100644 --- a/app/Jobs/SendWechatBotMessage.php +++ b/app/Jobs/SendWechatBotMessage.php @@ -56,15 +56,8 @@ class SendWechatBotMessage implements ShouldQueue return; } - $params = SysParam::where('alias', 'wechat_bot_config')->first(); - if ($params && ! empty($params->body)) { - $config = json_decode($params->body, true); - $isEnabled = $config['global_enabled'] ?? false; - - if (! $isEnabled) { - return; // 全局未开启,直接抛弃不发 - } - } + // 所有的触发开关判断(如百家乐、管理员上线等)已经提前在 WechatNotificationService 中拦截判断过了。 + // 所以能进入到这个任务的消息,都是明确需要发送的。 try { $apiService->sendTextMessage($this->target, $this->message);