Browse Source

添加中奖概率

kk 3 months ago
parent
commit
f345ddea80

+ 1 - 1
game-business/src/main/java/com/game/business/controller/AppGameItemController.java

@@ -80,7 +80,7 @@ public class AppGameItemController extends BaseController
                 AppGameItemVO appGameItemVO = new AppGameItemVO();
                 BeanUtils.copyProperties(gameItem, appGameItemVO);
                 BigDecimal lotteryCount = new BigDecimal(gameItem.getLotteryCount());
-                appGameItemVO.setLotteryRate(lotteryCount.divide(lotteryCountSum).setScale(2, BigDecimal.ROUND_DOWN).doubleValue());
+                appGameItemVO.setLotteryRate(lotteryCount.divide(lotteryCountSum).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
             }
         }