瀏覽代碼

添加中奖概率

kk 3 月之前
父節點
當前提交
f345ddea80
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      game-business/src/main/java/com/game/business/controller/AppGameItemController.java

+ 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());
             }
         }