This commit is contained in:
2025-12-21 20:54:12 +08:00
parent 694483f526
commit 0624562dda
3 changed files with 14 additions and 12 deletions

View File

@@ -245,8 +245,8 @@ if small_total_times >= small_trigger_times then
result.big_ratio = big_ratio
-- 大奖金额计算(基于开奖前的总金额)
result.big_prize_amount = math.floor(result.big_pool_total_before_open * big_ratio / 100 * 100) / 100
result.big_release_amount = math.floor((result.big_pool_total_before_open - result.big_prize_amount) * 100) / 100
result.big_prize_amount = math.floor(big_threshold * big_ratio / 100)
result.big_release_amount = math.floor(big_total_gold - result.big_prize_amount
-- 重置大奖池,大轮次+1
redis.call('set', big_total_gold_key, 0)

View File

@@ -152,17 +152,17 @@ class LotteryService
2, // 大奖池
3, // 划转
$result['small_remain_amount'],//小奖剩余金额
$result['big_total_gold'] - $result['small_remain_amount'],
$result['big_total_gold'],
$result['big_pool_total_before_open'] - $result['small_remain_amount'],
$result['big_pool_total_before_open'],
$giftId,
$result['big_round'] - ($result['is_big_prize'] ? 1 : 0),
"小奖剩余划转大奖池:{$result['small_remain_amount']}金币"
);
//2.开小奖剩余划入大奖后 大奖够开奖
//开大奖
if ($result['is_big_prize'] == 1) {
// 大奖中奖记录
//2.1 大奖中奖记录
$this->addWinnerRecord(
$winnerUid,
2, // 大奖