一键测试权重-新增安全线杀分机制,保证测试数据合理

This commit is contained in:
2026-03-27 17:50:11 +08:00
parent 2f05ac0cd9
commit afd6113927
13 changed files with 140 additions and 45 deletions

View File

@@ -30,6 +30,8 @@ use think\model\relation\HasMany;
* @property int $paid_s_count 付费抽奖顺时针次数
* @property int $paid_n_count 付费抽奖逆时针次数
* @property int $chain_free_mode 1=链式再来一次免费抽奖
* @property int $kill_mode_enabled 测试内杀分开关 1=开启
* @property int $test_safety_line 测试内安全线(模拟玩家累计盈利阈值)
* @property int $paid_planned_spins 计划付费抽奖次数(顺+逆)
* @property int $play_again_count 再来一次次数(T5触发次数)
* @property array|null $paid_tier_weights 付费自定义档位权重 T1-T5
@@ -68,6 +70,22 @@ class DiceRewardConfigRecord extends BaseModel
return $this->hasMany(DicePlayRecordTest::class, 'reward_config_record_id', 'id');
}
/** 计划付费抽奖次数(顺+逆) */
public function searchPaidPlannedSpinsAttr($query, $value): void
{
if ($value !== '' && $value !== null) {
$query->where('paid_planned_spins', '=', $value);
}
}
/** 底注/注数dice_ante_config.mult */
public function searchAnteAttr($query, $value): void
{
if ($value !== '' && $value !== null) {
$query->where('ante', '=', $value);
}
}
/**
* 根据关联的 DicePlayRecordTest 统计平台赚取平台币
* platform_profit = 关联的付费(lottery_type=0)付费金额求和(paid_amount) - 关联的 win_coin 求和