This commit is contained in:
2026-01-28 09:42:04 +08:00
parent 2eeee057f8
commit de6676895a
3 changed files with 15 additions and 11 deletions

View File

@@ -169,7 +169,7 @@ class Lottery extends Model
//不做处理 //不做处理
} else {//开奖 } else {//开奖
$beilv = floor($result['small_prize_amount'] / $gift_price); $beilv = floor($result['small_prize_amount'] / $gift_price);
$small_prize_amount = floor($result['small_prize_amount']); $small_prize_amount = floor($result['small_prize_amount'] / $gift_price) * $gift_price;
$wallet_update = model('api/UserWallet')->change_user_cion_log($send_uid,$small_prize_amount,$room_id,58,'参与幸运币活动获得'.$beilv.'倍'); $wallet_update = model('api/UserWallet')->change_user_cion_log($send_uid,$small_prize_amount,$room_id,58,'参与幸运币活动获得'.$beilv.'倍');
if(!$wallet_update){ if(!$wallet_update){
return ['code' => 0, 'msg' => '流水记录失败', 'data' => null]; return ['code' => 0, 'msg' => '流水记录失败', 'data' => null];

View File

@@ -111,22 +111,24 @@ class LotteryService10
); );
} else { } else {
$winnerUid = $send_uid; // 奖默认给当前送礼用户 $winnerUid = $send_uid; // 奖默认给当前送礼用户
//中奖金额
$prizeAmount = floor($result['small_prize_amount'] / $gift_gold) * $gift_gold;
// 小奖中奖记录 // 小奖中奖记录
$this->addWinnerRecord( $this->addWinnerRecord(
$winnerUid, $winnerUid,
4, // 高级奖池 4, // 高级奖池
$result['small_prize_amount'],//中奖金额 $prizeAmount,//中奖金额
$result['small_total_gold'],//奖池总金额 $result['small_total_gold'],//奖池总金额
$this->getSmallRatio($result['small_prize_amount'], $result['small_total_gold']),//中奖比例 $this->getSmallRatio($result['small_prize_amount'], $result['small_total_gold']),//中奖比例
$result['small_total_gold'] - floor($result['small_prize_amount']) //释放金额 $result['small_total_gold'] - $prizeAmount //释放金额
); );
// 3. 小奖池开奖流水 // 3. 小奖池开奖流水
$this->addPoolFlow( $this->addPoolFlow(
1, // 1, //
2, // 4, //
$result['small_prize_amount'], $prizeAmount,
$result['small_total_gold'], $result['small_total_gold'],
$result['small_total_gold'] - $result['small_prize_amount'], $result['small_total_gold'] - $prizeAmount,
$giftId, $giftId,
$result['small_round'] - 1, // 开奖轮次为当前轮次-1已结束的轮次 $result['small_round'] - 1, // 开奖轮次为当前轮次-1已结束的轮次
"小奖池开奖:轮次" . ($result['small_round'] - 1).",中奖金额:{$result['small_prize_amount']}金币" "小奖池开奖:轮次" . ($result['small_round'] - 1).",中奖金额:{$result['small_prize_amount']}金币"

View File

@@ -114,22 +114,24 @@ class LotteryService5
); );
} else { } else {
$winnerUid = $send_uid; // 奖默认给当前送礼用户 $winnerUid = $send_uid; // 奖默认给当前送礼用户
//中奖金额
$prizeAmount = floor($result['small_prize_amount'] / $gift_gold) * $gift_gold;
// 小奖中奖记录 // 小奖中奖记录
$this->addWinnerRecord( $this->addWinnerRecord(
$winnerUid, $winnerUid,
3, // 中级奖 3, // 中级奖
$result['small_prize_amount'],//中奖金额 $prizeAmount,//中奖金额
$result['small_total_gold'],//奖池总金额 $result['small_total_gold'],//奖池总金额
$this->getSmallRatio($result['small_prize_amount'], $result['small_total_gold']),//中奖比例 $this->getSmallRatio($result['small_prize_amount'], $result['small_total_gold']),//中奖比例
$result['small_total_gold'] - floor($result['small_prize_amount']) //释放金额 $result['small_total_gold'] - $prizeAmount //释放金额
); );
// 3. 小奖池开奖流水 // 3. 小奖池开奖流水
$this->addPoolFlow( $this->addPoolFlow(
1, // 1, //
2, // 4, //
$result['small_prize_amount'], $prizeAmount,
$result['small_total_gold'], $result['small_total_gold'],
$result['small_total_gold'] - $result['small_prize_amount'], $result['small_total_gold'] - $prizeAmount,
$giftId, $giftId,
$result['small_round'] - 1, // 开奖轮次为当前轮次-1已结束的轮次 $result['small_round'] - 1, // 开奖轮次为当前轮次-1已结束的轮次
"小奖池开奖:轮次" . ($result['small_round'] - 1).",中奖金额:{$result['small_prize_amount']}金币" "小奖池开奖:轮次" . ($result['small_round'] - 1).",中奖金额:{$result['small_prize_amount']}金币"