|
|
@@ -62,7 +62,7 @@ class RechargeBonusTest extends TestCase
|
|
|
(require dirname(__DIR__, 2) . '/database/migrations/2026_10_28_160000_create_recharge_method_logos.php')->up();
|
|
|
DB::table('recharge_channel_group')->insert(['id' => 1, 'activity_type' => '', 'recharge_type' => 'JDpay,rgcz,usdt']);
|
|
|
foreach (['JDpay', 'rgcz', 'usdt'] as $type) DB::table('recharge_channel')->insert(['data_type' => 1, 'type' => $type, 'name' => $type]);
|
|
|
- foreach (['huishui_percentage' => '0', 'huishui_restriction' => '0', 'recharge_rate' => '0', 'recharges_bibi_return' => '0'] as $field => $val) DB::table('config')->insert(compact('field', 'val'));
|
|
|
+ foreach (['huishui_percentage' => '0', 'huishui_restriction' => '0', 'recharge_rate' => '0'] as $field => $val) DB::table('config')->insert(compact('field', 'val'));
|
|
|
foreach ([1 => 1, 2 => 2, 3 => -1] as $id => $from) {
|
|
|
DB::table('users')->insert(['id' => $id, 'member_id' => 'm' . $id, 'user_id' => 'u' . $id, 'from' => $from, 'language' => 'zh']);
|
|
|
DB::table('wallets')->insert(['member_id' => 'm' . $id]);
|
|
|
@@ -97,9 +97,8 @@ class RechargeBonusTest extends TestCase
|
|
|
{
|
|
|
(new \App\Services\PromotionAdminService())->save(['type' => 8, 'status' => 1, 'start_time' => '2026-10-01', 'end_time' => '2026-12-01',
|
|
|
'translations' => array_fill_keys(['zh','en','vi'], ['title' => 'First', 'content' => 'First bonus']), 'params' => ['min_deposit' => '1000', 'reward_amount' => '25']]);
|
|
|
- DB::table('config')->where('field', 'recharges_bibi_return')->update(['val' => '0.10']);
|
|
|
$order = $this->order(); $this->assertTrue($this->pay($order)); $this->assertFalse($this->pay($order));
|
|
|
- $this->assertSame('1175.00', $this->balance());
|
|
|
+ $this->assertSame('1075.00', $this->balance());
|
|
|
$this->assertSame('50.00', bcadd((string)DB::table('recharge_bonus_rewards')->value('amount'), '0', 2));
|
|
|
$this->assertSame(1, DB::table('recharge_bonus_rewards')->count());
|
|
|
$this->assertSame(1, DB::table('balance_logs')->where('change_type', '三方充值')->count());
|