优化一键测试权重
This commit is contained in:
@@ -22,17 +22,16 @@ use think\model\relation\HasMany;
|
||||
* @property int|null $lottery_config_id 测试时使用的奖池配置 ID(兼容旧:付费+免费共用)
|
||||
* @property int|null $paid_lottery_config_id 付费抽奖奖池配置 ID,默认 type=0
|
||||
* @property int|null $free_lottery_config_id 免费抽奖奖池配置 ID,默认 type=1
|
||||
* @property int $total_play_count 总模拟次数(s_count+n_count)
|
||||
* @property int $total_play_count 总模拟次数
|
||||
* @property int $over_play_count 已完成次数
|
||||
* @property int $status 状态 -1失败 0进行中 1成功
|
||||
* @property string|null $remark 失败时记录原因
|
||||
* @property int|null $ante 底注/注数(dice_ante_config.mult)
|
||||
* @property int $s_count 顺时针模拟次数(兼容旧数据)
|
||||
* @property int $n_count 逆时针模拟次数(兼容旧数据)
|
||||
* @property int $paid_s_count 付费抽奖顺时针次数
|
||||
* @property int $paid_n_count 付费抽奖逆时针次数
|
||||
* @property int $free_s_count 免费抽奖顺时针次数
|
||||
* @property int $free_n_count 免费抽奖逆时针次数
|
||||
* @property int $chain_free_mode 1=链式再来一次免费抽奖
|
||||
* @property int $paid_planned_spins 计划付费抽奖次数(顺+逆)
|
||||
* @property int $play_again_count 再来一次次数(T5触发次数)
|
||||
* @property array|null $paid_tier_weights 付费自定义档位权重 T1-T5
|
||||
* @property array|null $free_tier_weights 免费自定义档位权重 T1-T5
|
||||
* @property array $result_counts 落点统计 grid_number=>出现次数
|
||||
@@ -85,6 +84,18 @@ class DiceRewardConfigRecord extends BaseModel
|
||||
return round($paidAmount - $sumWinCoin, 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据关联的 DicePlayRecordTest 统计再来一次次数(reward_tier=T5)
|
||||
* @param int $recordId
|
||||
* @return int
|
||||
*/
|
||||
public static function computePlayAgainCountFromRelated(int $recordId): int
|
||||
{
|
||||
return (int) DicePlayRecordTest::where('reward_config_record_id', $recordId)
|
||||
->where('reward_tier', 'T5')
|
||||
->count();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据关联的 DicePlayRecordTest 统计落点次数
|
||||
* result_counts = [grid_number => 出现次数],只统计 roll_number 在 5-30 之间的记录
|
||||
|
||||
Reference in New Issue
Block a user