|
@@ -5232,7 +5232,7 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
//根据维度选择 子表父表
|
|
|
String costTable = "game_ads.ads_recharge_monitoring_cost";
|
|
|
String orderTable = "game_ads.ads_recharge_monitoring_amount";
|
|
|
- if (dto.getGameDimension()!=null&&dto.getGameDimension() != 1) {
|
|
|
+ if (dto.getGameDimension() != null && dto.getGameDimension() != 1) {
|
|
|
costTable = "game_ads_parent.ads_recharge_monitoring_cost_parent";
|
|
|
orderTable = "game_ads_parent.ads_recharge_monitoring_amount_parent";
|
|
|
}
|
|
@@ -5269,21 +5269,18 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
if (CollectionUtils.isEmpty(records)) {
|
|
|
return vo;
|
|
|
}
|
|
|
- BigDecimal amountCount = new BigDecimal(BigInteger.ZERO);
|
|
|
+ Double amountCount = 0.0;
|
|
|
//取出24点充值,累计
|
|
|
for (FlowMonitorVO record : records) {
|
|
|
- BigDecimal bigDecimal = new BigDecimal(record.getTwentyfourAmount());
|
|
|
- amountCount = amountCount.add(bigDecimal);
|
|
|
+ amountCount += record.getTwentyfourAmount();
|
|
|
}
|
|
|
-
|
|
|
+ vo.setAmountCount(amountCount);
|
|
|
//取出总消耗
|
|
|
- String costCountStr = records.get(0).getCostCount();
|
|
|
+ Double costCountStr = records.get(0).getCostCount();
|
|
|
vo.setCostCount(costCountStr);
|
|
|
- BigDecimal costCount = new BigDecimal(costCountStr);
|
|
|
//用充值总数/总消耗
|
|
|
- if(amountCount.compareTo(BigDecimal.ZERO)!=0){
|
|
|
- vo.setRecoveryCount(amountCount.divide(costCount,RoundingMode.CEILING)+"%");
|
|
|
- vo.setAmountCount(amountCount.toString());
|
|
|
+ if (amountCount != 0) {
|
|
|
+ vo.setRecoveryCount((amountCount / costCountStr)*100);
|
|
|
}
|
|
|
return vo;
|
|
|
}
|
|
@@ -5364,17 +5361,17 @@ public class GameDataServiceImpl implements IGameDataService {
|
|
|
b.maxDay,
|
|
|
a.day,
|
|
|
a.ten_amount,
|
|
|
- CONCAT(ROUND(a.ten_rate,2)*100,'%') as ten_rate, -- 10点环比
|
|
|
- CONCAT(ROUND(IF(ten_amount>0,ten_amount/b.costCount,ten_amount),2)*100,'%') as ten_recovery, -- 10点回报率(充值/消耗)
|
|
|
+ ROUND(a.ten_rate,2)*100 as ten_rate, -- 10点环比
|
|
|
+ ROUND(IF(ten_amount>0,ten_amount/b.costCount,ten_amount),2)*100 as ten_recovery, -- 10点回报率(充值/消耗)
|
|
|
a.fourteen_amount, -- 14点充值
|
|
|
- CONCAT(ROUND(a.fourteen_rate,2)*100,'%') as fourteen_rate, -- 14点环比
|
|
|
- CONCAT(ROUND(IF(fourteen_amount>0,fourteen_amount/b.costCount,fourteen_amount),2)*100,'%') as fourteen_recovery, -- 14点回报率
|
|
|
+ ROUND(a.fourteen_rate,2)*100 as fourteen_rate, -- 14点环比
|
|
|
+ ROUND(IF(fourteen_amount>0,fourteen_amount/b.costCount,fourteen_amount),2)*100 as fourteen_recovery, -- 14点回报率
|
|
|
a.seventeen_amount, -- 17点充值
|
|
|
- CONCAT(ROUND(a.seventeen_rate,2)*100,'%') as seventeen_rate, -- 17点环比
|
|
|
- CONCAT(ROUND(IF(seventeen_amount>0,seventeen_amount/b.costCount,seventeen_amount),2)*100,'%') as seventeen_recovery, -- 17点回报率
|
|
|
+ ROUND(a.seventeen_rate,2)*100 as seventeen_rate, -- 17点环比
|
|
|
+ ROUND(IF(seventeen_amount>0,seventeen_amount/b.costCount,seventeen_amount),2)*100 as seventeen_recovery, -- 17点回报率
|
|
|
a.twentyfour_amount, -- 24点充值
|
|
|
- CONCAT(ROUND(a.twentyfour_rate,2)*100,'%') as twentyfour_rate, -- 24点环比
|
|
|
- CONCAT(ROUND(IF(twentyfour_amount>0,twentyfour_amount/b.costCount,twentyfour_amount),2)*100,'%') as twentyfour_recovery, -- 24点回报率
|
|
|
+ ROUND(a.twentyfour_rate,2)*100 as twentyfour_rate, -- 24点环比
|
|
|
+ ROUND(IF(twentyfour_amount>0,twentyfour_amount/b.costCount,twentyfour_amount),2)*100 as twentyfour_recovery, -- 24点回报率
|
|
|
b.costCount,
|
|
|
a.pitcher_id, -- 投手id
|
|
|
a.pitcher_name, -- 投手名称
|