|
@@ -185,10 +185,10 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
|
pager.setRecordCount((int) Daos.queryCount(dao, sqlCount));
|
|
|
List<GamePromoteTotalVO> list = sql.getList(GamePromoteTotalVO.class);
|
|
|
|
|
|
- //存在充值时间,获取表ads_dayn_amount的json数据
|
|
|
+ //渠道注册时间内的dayn充值数据,获取表ads_dayn_amount的json数据
|
|
|
Map<String, Object> dayNMap = new HashMap<>(4);
|
|
|
- dayNMap.put("beginDay", dto.getRechargeBeginDay());
|
|
|
- dayNMap.put("endDay", dto.getRechargeEndDay());
|
|
|
+ dayNMap.put("beginDay", dto.getCostBeginDay());
|
|
|
+ dayNMap.put("endDay", dto.getCostEndDay());
|
|
|
|
|
|
//循环总数据的每条数据
|
|
|
List<GamePromoteTotalVO> hasRechargeDayList = list.stream().map(item -> {
|
|
@@ -208,7 +208,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
|
List<Map<String, String>> jsonList = gson.fromJson(dayNList.toString(), ArrayList.class);
|
|
|
|
|
|
Map<String, String> resultMap = new HashMap<>();
|
|
|
- resultMap.put("dayN", "0.00-0-0");
|
|
|
+ resultMap.put("dayN", "0.00-0-0-0");
|
|
|
for (Map<String, String> jsonMap : jsonList) {
|
|
|
for (Map.Entry<String, String> entry : jsonMap.entrySet()) {
|
|
|
String key = entry.getKey();
|
|
@@ -220,7 +220,8 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
|
BigDecimal money = new BigDecimal(existingParts[0]).add(new BigDecimal(parts[0]));
|
|
|
int count = Integer.parseInt(existingParts[1]) + Integer.parseInt(parts[1]);
|
|
|
int num = Integer.parseInt(existingParts[2]) + Integer.parseInt(parts[2]);
|
|
|
- String newValue = money + "-" + count + "-" + num;
|
|
|
+ int repeatNum = Integer.parseInt(existingParts[3]) + Integer.parseInt(parts[3]);
|
|
|
+ String newValue = money + "-" + count + "-" + num + "-" + repeatNum;
|
|
|
resultMap.put("dayN", newValue);
|
|
|
}
|
|
|
}
|
|
@@ -231,6 +232,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
|
.rechargeMoney(new BigDecimal(parts[0]))
|
|
|
.rechargeCount(Long.valueOf(parts[1]))
|
|
|
.rechargeNum(Long.valueOf(parts[2]))
|
|
|
+ .repeatNum(Long.valueOf(parts[3]))
|
|
|
.build();
|
|
|
}
|
|
|
}
|
|
@@ -239,6 +241,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
|
item.setUserRechargeMoney(dayN.getRechargeMoney());
|
|
|
item.setUserRechargeCount(dayN.getRechargeCount());
|
|
|
item.setUserRechargeUser(dayN.getRechargeNum());
|
|
|
+ item.setRepeatRechargeUser(dayN.getRepeatNum());
|
|
|
item.setUserRechargeArpu(item.getUserRechargeUser() == 0 ?
|
|
|
BigDecimal.ZERO:item.getUserRechargeMoney().divide(BigDecimal.valueOf(item.getUserRechargeUser()),4, RoundingMode.DOWN));
|
|
|
|
|
@@ -260,6 +263,11 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
|
|
|
|
item.setUserRechargeCost(item.getUserRechargeUser() == 0 ?
|
|
|
BigDecimal.ZERO:item.getCost().divide(BigDecimal.valueOf(item.getUserRechargeUser()),4, RoundingMode.DOWN));
|
|
|
+
|
|
|
+ item.setRepeatRechargeRate(item.getUserRechargeUser() == 0 ?
|
|
|
+ BigDecimal.ZERO:BigDecimal.valueOf(item.getRepeatRechargeUser()).divide(BigDecimal.valueOf(item.getUserRechargeUser()),4, RoundingMode.DOWN));
|
|
|
+ item.setUserRepeatRechargeRate(item.getNewUserRechargeUser() == 0 ?
|
|
|
+ BigDecimal.ZERO:BigDecimal.valueOf(item.getRepeatRechargeUser()).divide(BigDecimal.valueOf(item.getNewUserRechargeUser()),4, RoundingMode.DOWN));
|
|
|
}
|
|
|
return item;
|
|
|
}).collect(Collectors.toList());
|
|
@@ -542,5 +550,6 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
|
private BigDecimal rechargeMoney;
|
|
|
private Long rechargeCount;
|
|
|
private Long rechargeNum;
|
|
|
+ private Long repeatNum;
|
|
|
}
|
|
|
}
|