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) {