|
@@ -100,14 +100,14 @@ public class AdsOverallSummaryServiceImpl implements IAdsOverallSummaryService {
|
|
//7日内总消耗
|
|
//7日内总消耗
|
|
BigDecimal d7TotalCost = (BigDecimal) dao.func2(AdsOverallSummary.class, "sum", "todayTotalCost", myCondition(param, false, 7));
|
|
BigDecimal d7TotalCost = (BigDecimal) dao.func2(AdsOverallSummary.class, "sum", "todayTotalCost", myCondition(param, false, 7));
|
|
//计算7日Roi
|
|
//计算7日Roi
|
|
- adsOverallSummaryVO.setD7TotalRoi(BigDecimal.ZERO.equals(d7TotalCost) ? BigDecimal.ZERO : d7NewPlayerAmount.divide(d7TotalCost, 4, RoundingMode.HALF_UP));
|
|
|
|
|
|
+ adsOverallSummaryVO.setD7TotalRoi((BigDecimal.ZERO.compareTo(d7TotalCost) == 0) ? BigDecimal.ZERO : d7NewPlayerAmount.divide(d7TotalCost, 4, RoundingMode.HALF_UP));
|
|
|
|
|
|
//30日内新用户累计充值
|
|
//30日内新用户累计充值
|
|
BigDecimal d30NewPlayerAmount = (BigDecimal) dao.func2(AdsOverallSummary.class, "sum", "todayNewPlayerAmount", myCondition(param, false, 30));
|
|
BigDecimal d30NewPlayerAmount = (BigDecimal) dao.func2(AdsOverallSummary.class, "sum", "todayNewPlayerAmount", myCondition(param, false, 30));
|
|
//30日内总消耗
|
|
//30日内总消耗
|
|
- BigDecimal d30TotalCost = (BigDecimal)dao.func2(AdsOverallSummary.class, "sum", "todayTotalCost", myCondition(param, false, 30));
|
|
|
|
|
|
+ BigDecimal d30TotalCost = (BigDecimal) dao.func2(AdsOverallSummary.class, "sum", "todayTotalCost", myCondition(param, false, 30));
|
|
//计算30日Roi
|
|
//计算30日Roi
|
|
- adsOverallSummaryVO.setD30TotalRoi(BigDecimal.ZERO.equals(d30TotalCost) ? BigDecimal.ZERO : d30NewPlayerAmount.divide(d30TotalCost, 4, RoundingMode.HALF_UP));
|
|
|
|
|
|
+ adsOverallSummaryVO.setD30TotalRoi((BigDecimal.ZERO.compareTo(d30TotalCost) == 0) ? BigDecimal.ZERO : d30NewPlayerAmount.divide(d30TotalCost, 4, RoundingMode.HALF_UP));
|
|
|
|
|
|
return adsOverallSummaryVO;
|
|
return adsOverallSummaryVO;
|
|
}
|
|
}
|
|
@@ -249,7 +249,7 @@ public class AdsOverallSummaryServiceImpl implements IAdsOverallSummaryService {
|
|
* 检查前端查询日期内的数据是否在数据库中都存在
|
|
* 检查前端查询日期内的数据是否在数据库中都存在
|
|
* 不存在要设置默认值 0
|
|
* 不存在要设置默认值 0
|
|
*
|
|
*
|
|
- * @param list 需要判断的list
|
|
|
|
|
|
+ * @param list 需要判断的list
|
|
* @param param 前端传递的查询参数实体
|
|
* @param param 前端传递的查询参数实体
|
|
* @return 返回给前端的折线图数据 list
|
|
* @return 返回给前端的折线图数据 list
|
|
*/
|
|
*/
|