From f8d5a3b250b56c9ff3691cc657b71d1a4631c4e8 Mon Sep 17 00:00:00 2001 From: lkddi Date: Sun, 12 Apr 2026 21:42:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96ai=E5=B0=8F=E7=8F=AD=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Jobs/AiBaccaratBetJob.php | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/app/Jobs/AiBaccaratBetJob.php b/app/Jobs/AiBaccaratBetJob.php index 91f1f19..fa8eec3 100644 --- a/app/Jobs/AiBaccaratBetJob.php +++ b/app/Jobs/AiBaccaratBetJob.php @@ -316,19 +316,17 @@ class AiBaccaratBetJob implements ShouldQueue private function manageFinances(User $user, ChatStateService $chatState): void { // 1. 检查是否有“买单”活动补偿可领取 (jjb 较低时优先领取) - if ($user->jjb < 20000) { - $lossCoverService = app(\App\Services\BaccaratLossCoverService::class); - $pendingEvents = \App\Models\BaccaratLossCoverEvent::where('status', 'claimable')->get(); - foreach ($pendingEvents as $event) { - $record = \App\Models\BaccaratLossCoverRecord::where('event_id', $event->id) - ->where('user_id', $user->id) - ->where('claim_status', 'pending') - ->first(); + $lossCoverService = app(\App\Services\BaccaratLossCoverService::class); + $pendingEvents = \App\Models\BaccaratLossCoverEvent::where('status', 'claimable')->get(); + foreach ($pendingEvents as $event) { + $record = \App\Models\BaccaratLossCoverRecord::where('event_id', $event->id) + ->where('user_id', $user->id) + ->where('claim_status', 'pending') + ->first(); - if ($record && $record->compensation_amount > 0) { - $lossCoverService->claim($event, $user); - Log::info("AI小班长自动领取活动补偿: Event #{$event->id}, Amount: {$record->compensation_amount}"); - } + if ($record && $record->compensation_amount > 0) { + $lossCoverService->claim($event, $user); + Log::info("AI小班长自动领取活动补偿: Event #{$event->id}, Amount: {$record->compensation_amount}"); } } @@ -338,8 +336,8 @@ class AiBaccaratBetJob implements ShouldQueue $currentBank = (int) $user->bank_jjb; // 如果手上金币超过 10万,且存款未达 3000万,则进行存款 - if ($user->jjb > 100000 && $currentBank < $bankTarget2) { - $depositAmount = $user->jjb - 50000; // 留 5万在手上作为本金 + if ($user->jjb > 1000000 && $currentBank < $bankTarget2) { + $depositAmount = $user->jjb - 500000; // 留 5万在手上作为本金 // 如果存款快到目标了,按需存入 if ($currentBank < $bankTarget1 && ($currentBank + $depositAmount) > $bankTarget1) {