优化ai小班长
This commit is contained in:
@@ -316,7 +316,6 @@ class AiBaccaratBetJob implements ShouldQueue
|
|||||||
private function manageFinances(User $user, ChatStateService $chatState): void
|
private function manageFinances(User $user, ChatStateService $chatState): void
|
||||||
{
|
{
|
||||||
// 1. 检查是否有“买单”活动补偿可领取 (jjb 较低时优先领取)
|
// 1. 检查是否有“买单”活动补偿可领取 (jjb 较低时优先领取)
|
||||||
if ($user->jjb < 20000) {
|
|
||||||
$lossCoverService = app(\App\Services\BaccaratLossCoverService::class);
|
$lossCoverService = app(\App\Services\BaccaratLossCoverService::class);
|
||||||
$pendingEvents = \App\Models\BaccaratLossCoverEvent::where('status', 'claimable')->get();
|
$pendingEvents = \App\Models\BaccaratLossCoverEvent::where('status', 'claimable')->get();
|
||||||
foreach ($pendingEvents as $event) {
|
foreach ($pendingEvents as $event) {
|
||||||
@@ -330,7 +329,6 @@ class AiBaccaratBetJob implements ShouldQueue
|
|||||||
Log::info("AI小班长自动领取活动补偿: Event #{$event->id}, Amount: {$record->compensation_amount}");
|
Log::info("AI小班长自动领取活动补偿: Event #{$event->id}, Amount: {$record->compensation_amount}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// 2. 自动存款逻辑:长期目标 1000万 / 3000万
|
// 2. 自动存款逻辑:长期目标 1000万 / 3000万
|
||||||
$bankTarget1 = 10000000;
|
$bankTarget1 = 10000000;
|
||||||
@@ -338,8 +336,8 @@ class AiBaccaratBetJob implements ShouldQueue
|
|||||||
$currentBank = (int) $user->bank_jjb;
|
$currentBank = (int) $user->bank_jjb;
|
||||||
|
|
||||||
// 如果手上金币超过 10万,且存款未达 3000万,则进行存款
|
// 如果手上金币超过 10万,且存款未达 3000万,则进行存款
|
||||||
if ($user->jjb > 100000 && $currentBank < $bankTarget2) {
|
if ($user->jjb > 1000000 && $currentBank < $bankTarget2) {
|
||||||
$depositAmount = $user->jjb - 50000; // 留 5万在手上作为本金
|
$depositAmount = $user->jjb - 500000; // 留 5万在手上作为本金
|
||||||
|
|
||||||
// 如果存款快到目标了,按需存入
|
// 如果存款快到目标了,按需存入
|
||||||
if ($currentBank < $bankTarget1 && ($currentBank + $depositAmount) > $bankTarget1) {
|
if ($currentBank < $bankTarget1 && ($currentBank + $depositAmount) > $bankTarget1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user