From 9bfcc77d1cde1b07e3a066d4b498c32df3e88ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Mon, 22 Dec 2025 16:09:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=88=86=E5=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/service/LotteryService.php | 36 ++++++++++++------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/application/common/service/LotteryService.php b/application/common/service/LotteryService.php index 6ac676f7..1e1bf602 100644 --- a/application/common/service/LotteryService.php +++ b/application/common/service/LotteryService.php @@ -147,21 +147,21 @@ class LotteryService ); } else { $winnerUid = $send_uid; // 奖默认给当前送礼用户 - // 1. 只要开小奖,小奖剩余划入大奖池流水 - $this->addPoolFlow( - 2, // 大奖池 - 3, // 划转 - $result['small_remain_amount'],//小奖剩余金额 - $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) { + //开小奖,小奖剩余划入大奖池流水 + $this->addPoolFlow( + 2, // 大奖池 + 3, // 划转 + $result['small_remain_amount'],//小奖剩余金额 + $result['big_total_gold'] - $result['small_remain_amount'], + $result['big_total_gold'], + $giftId, + $result['big_round'] - ($result['is_big_prize'] ? 1 : 0), + "小奖剩余划转大奖池:{$result['small_remain_amount']}金币" + ); + //2.1 大奖中奖记录 $this->addWinnerRecord( $winnerUid, @@ -217,7 +217,17 @@ class LotteryService $result['small_round'] - 1, // 开奖轮次为当前轮次-1(已结束的轮次) "小奖池开奖:轮次" . ($result['small_round'] - 1).",中奖金额:{$result['small_prize_amount']}金币" ); - + //开小奖,小奖剩余划入大奖池流水 + $this->addPoolFlow( + 2, // 大奖池 + 3, // 划转 + $result['small_remain_amount'],//小奖剩余金额 + $result['big_total_gold'] - $result['small_remain_amount'], + $result['big_total_gold'], + $giftId, + $result['big_round'] - ($result['is_big_prize'] ? 1 : 0), + "小奖剩余划转大奖池:{$result['small_remain_amount']}金币" + ); } }