Procházet zdrojové kódy

添加中奖概率

kk před 3 měsíci
rodič
revize
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());
             }
         }