优化ai小班长

This commit is contained in:
2026-04-12 22:42:32 +08:00
parent d739fc7028
commit 353aaaf6ce
6 changed files with 36 additions and 36 deletions
+8 -8
View File
@@ -3,7 +3,7 @@
/**
* 文件功能:AI小班长百家乐下注任务测试
*
* 覆盖 AI 在“你玩游戏我买单”活动进行中时的全额下注策略,
* 覆盖 AI 在“你玩游戏我买单”活动时间窗口内的最高限额下注策略,
* 并验证下注会正确挂到买单活动记录上。
*/
@@ -57,9 +57,9 @@ class AiBaccaratBetJobTest extends TestCase
}
/**
* 买单活动进行中时,AI 动用全部总资产下注,并把下注挂到活动名下。
* 买单活动时间窗口命中时,AI 按百家乐最大下注额下注,并把下注挂到活动名下。
*/
public function test_ai_bets_all_spendable_gold_when_loss_cover_event_is_active(): void
public function test_ai_bets_baccarat_max_bet_when_loss_cover_time_window_is_active(): void
{
Event::fake();
Queue::fake([SaveMessageJob::class]);
@@ -87,7 +87,7 @@ class AiBaccaratBetJobTest extends TestCase
]);
$event = BaccaratLossCoverEvent::factory()->create([
'status' => 'active',
'status' => 'scheduled',
'starts_at' => now()->subMinutes(2),
'ends_at' => now()->addMinutes(10),
]);
@@ -114,14 +114,14 @@ class AiBaccaratBetJobTest extends TestCase
'user_id' => $aiUser->id,
'loss_cover_event_id' => $event->id,
'bet_type' => 'big',
'amount' => 1200000,
'amount' => 50000,
'status' => 'pending',
]);
$this->assertDatabaseHas('baccarat_loss_cover_records', [
'event_id' => $event->id,
'user_id' => $aiUser->id,
'total_bet_amount' => 1200000,
'total_bet_amount' => 50000,
'claim_status' => 'not_eligible',
]);
@@ -132,8 +132,8 @@ class AiBaccaratBetJobTest extends TestCase
$this->assertDatabaseHas('users', [
'id' => $aiUser->id,
'jjb' => 0,
'bank_jjb' => 0,
'jjb' => 950000,
'bank_jjb' => 200000,
]);
}
}
+4 -4
View File
@@ -3,8 +3,8 @@
/**
* 文件功能:AI小班长资金调度服务测试
*
* 覆盖 AI小班长的常规存款、全仓取款与阶段性目标公告逻辑,
* 防止后续调整后再次出现“超过 100 万未存款”或全仓提取异常。
* 覆盖 AI小班长的常规存款、大额调款与阶段性目标公告逻辑,
* 防止后续调整后再次出现“超过 100 万未存款”或银行调款异常。
*/
namespace Tests\Feature;
@@ -19,7 +19,7 @@ use Illuminate\Support\Facades\Queue;
use Tests\TestCase;
/**
* 验证 AI小班长的常规存款与全仓调仓规则。
* 验证 AI小班长的常规存款与大额调仓规则。
*/
class AiFinanceServiceTest extends TestCase
{
@@ -50,7 +50,7 @@ class AiFinanceServiceTest extends TestCase
}
/**
* 全仓支出场景允许从银行提取差额,把总资产集中到手上。
* 大额支出场景允许从银行提取差额,把目标下注额调到手上。
*/
public function test_prepare_all_in_spend_withdraws_needed_gold_from_bank(): void
{