Browse Source

修改内容:数值计算保留小数

lth 1 năm trước cách đây
mục cha
commit
6c28ee52ae

+ 4 - 4
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AdsOverallSummaryServiceImpl.java

@@ -96,16 +96,16 @@ public class AdsOverallSummaryServiceImpl implements IAdsOverallSummaryService {
 
         //7日和30日Roi数据需要手动计算
         //7日内新用户累计充值
-        BigDecimal d7NewPlayerAmount = BigDecimal.valueOf(dao.func(AdsOverallSummary.class, "sum", "todayNewPlayerAmount", myCondition(param, false, 7)));
+        BigDecimal d7NewPlayerAmount = (BigDecimal) dao.func2(AdsOverallSummary.class, "sum", "todayNewPlayerAmount", myCondition(param, false, 7));
         //7日内总消耗
-        BigDecimal d7TotalCost = BigDecimal.valueOf(dao.func(AdsOverallSummary.class, "sum", "todayTotalCost", myCondition(param, false, 7)));
+        BigDecimal d7TotalCost = (BigDecimal) dao.func2(AdsOverallSummary.class, "sum", "todayTotalCost", myCondition(param, false, 7));
         //计算7日Roi
         adsOverallSummaryVO.setD7TotalRoi(BigDecimal.ZERO.equals(d7TotalCost) ? BigDecimal.ZERO : d7NewPlayerAmount.divide(d7TotalCost, 4, RoundingMode.HALF_UP));
 
         //30日内新用户累计充值
-        BigDecimal d30NewPlayerAmount = BigDecimal.valueOf(dao.func(AdsOverallSummary.class, "sum", "todayNewPlayerAmount", myCondition(param, false, 30)));
+        BigDecimal d30NewPlayerAmount = (BigDecimal) dao.func2(AdsOverallSummary.class, "sum", "todayNewPlayerAmount", myCondition(param, false, 30));
         //30日内总消耗
-        BigDecimal d30TotalCost = BigDecimal.valueOf(dao.func(AdsOverallSummary.class, "sum", "todayTotalCost", myCondition(param, false, 30)));
+        BigDecimal d30TotalCost = (BigDecimal)dao.func2(AdsOverallSummary.class, "sum", "todayTotalCost", myCondition(param, false, 30));
         //计算30日Roi
         adsOverallSummaryVO.setD30TotalRoi(BigDecimal.ZERO.equals(d30TotalCost) ? BigDecimal.ZERO : d30NewPlayerAmount.divide(d30TotalCost, 4, RoundingMode.HALF_UP));