|
|
@@ -110,7 +110,7 @@ public class BonusPoolService {
|
|
|
return order.getBonus();
|
|
|
}
|
|
|
|
|
|
- @RedisLock(value = "'createBlindBoxOrder::'+#poolId", behavior = RedisLock.Behavior.WAIT)
|
|
|
+ @RedisLock(value = "'bonusPool::'+#poolId", behavior = RedisLock.Behavior.WAIT)
|
|
|
public void winningTheLottery(BonusPool pool, BonusPoolOrder order, Long poolId) {
|
|
|
BigDecimal price = new BigDecimal(0);
|
|
|
//ultimatePrize
|
|
|
@@ -118,16 +118,16 @@ public class BonusPoolService {
|
|
|
order.setWin(true);
|
|
|
order.setUltimate(true);
|
|
|
price = pool.getUltimatePrize();
|
|
|
- order.setBonus(price);
|
|
|
+
|
|
|
} else {
|
|
|
//smallPrice
|
|
|
BigDecimal divide = pool.getTotalAmount().divide(pool.getCriticalAmount(), 0, RoundingMode.DOWN);
|
|
|
if (pool.getSmallNum() < divide.intValue()) {
|
|
|
pool.setAwarded(pool.getAwarded() + 1);
|
|
|
price = pool.getSmallPrize();
|
|
|
- order.setBonus(price);
|
|
|
}
|
|
|
}
|
|
|
+ order.setBonus(price);
|
|
|
}
|
|
|
|
|
|
}
|