feat(wechat): 微信机器人全链路集成与稳定性修复

- 新增:管理员后台的微信机器人双向收发参数设置页面及扫码绑定能力。
- 新增:WechatBotApiService 与 KafkaConsumerService 模块打通过往僵尸进程导致的拒绝连接问题。
- 新增:下发所有群发/私聊通知时统一带上「[和平聊吧]」标注前缀。
- 优化:前端个人中心绑定逻辑支持一键生成及复制动态口令。
- 修复:闭环联调修补各个模型中产生的变量警告如 stdClass 对象获取等异常预警。
This commit is contained in:
2026-04-02 14:56:51 +08:00
parent 8a809e3cc0
commit fc57f97c9e
19 changed files with 1552 additions and 6 deletions
+9
View File
@@ -97,6 +97,7 @@ class CloseBaccaratRoundJob implements ShouldQueue
DB::transaction(function () use ($bets, $result, $config, $currency, &$totalPayout, &$winners, &$losers) {
foreach ($bets as $bet) {
/** @var \App\Models\BaccaratBet $bet */
$username = $bet->user->username ?? '匿名';
if ($result === 'kill') {
@@ -223,5 +224,13 @@ class CloseBaccaratRoundJob implements ShouldQueue
$chatState->pushMessage(1, $msg);
broadcast(new MessageSent(1, $msg));
SaveMessageJob::dispatch($msg);
// 触发微信机器人消息推送 (百家乐结果)
try {
$wechatService = new \App\Services\WechatBot\WechatNotificationService;
$wechatService->notifyBaccaratResult($content);
} catch (\Exception $e) {
\Illuminate\Support\Facades\Log::error('WechatBot baccarat notification failed', ['error' => $e->getMessage()]);
}
}
}