|
@@ -448,6 +448,13 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
|
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));
|
|
|
+
|
|
|
+ item.setUserRechargeCountCost(item.getUserRechargeCount() == 0 ?
|
|
|
+ BigDecimal.ZERO : item.getCost().divide(BigDecimal.valueOf(item.getUserRechargeCount()), 4, RoundingMode.DOWN));
|
|
|
+ item.setOldUserRechargeCountCost(item.getOldUserRechargeCount() == 0 ?
|
|
|
+ BigDecimal.ZERO : item.getCost().divide(BigDecimal.valueOf(item.getOldUserRechargeCount()), 4, RoundingMode.DOWN));
|
|
|
+ item.setShowRechargeCountCost(item.getShowRechargeCount() == 0 ?
|
|
|
+ BigDecimal.ZERO : item.getCost().divide(BigDecimal.valueOf(item.getShowRechargeCount()), 4, RoundingMode.DOWN));
|
|
|
}
|
|
|
return item;
|
|
|
}).collect(Collectors.toList());
|
|
@@ -737,6 +744,13 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
|
BigDecimal.ZERO : BigDecimal.valueOf(gamePromoteTotalSumVO.getRepeatRechargeUser()).divide(BigDecimal.valueOf(gamePromoteTotalSumVO.getUserRechargeUser()), 4, RoundingMode.DOWN));
|
|
|
gamePromoteTotalSumVO.setUserRepeatRechargeRate(gamePromoteTotalSumVO.getNewUserRechargeUser() == 0 ?
|
|
|
BigDecimal.ZERO : BigDecimal.valueOf(gamePromoteTotalSumVO.getRepeatRechargeUser()).divide(BigDecimal.valueOf(gamePromoteTotalSumVO.getNewUserRechargeUser()), 4, RoundingMode.DOWN));
|
|
|
+
|
|
|
+ gamePromoteTotalSumVO.setUserRechargeCountCost(gamePromoteTotalSumVO.getUserRechargeCount() == 0 ?
|
|
|
+ BigDecimal.ZERO : gamePromoteTotalSumVO.getCost().divide(BigDecimal.valueOf(gamePromoteTotalSumVO.getUserRechargeCount()), 4, RoundingMode.DOWN));
|
|
|
+ gamePromoteTotalSumVO.setOldUserRechargeCountCost(gamePromoteTotalSumVO.getOldUserRechargeCount() == 0 ?
|
|
|
+ BigDecimal.ZERO : gamePromoteTotalSumVO.getCost().divide(BigDecimal.valueOf(gamePromoteTotalSumVO.getOldUserRechargeCount()), 4, RoundingMode.DOWN));
|
|
|
+ gamePromoteTotalSumVO.setShowRechargeCountCost(gamePromoteTotalSumVO.getShowRechargeCount() == 0 ?
|
|
|
+ BigDecimal.ZERO : gamePromoteTotalSumVO.getCost().divide(BigDecimal.valueOf(gamePromoteTotalSumVO.getShowRechargeCount()), 4, RoundingMode.DOWN));
|
|
|
return gamePromoteTotalSumVO;
|
|
|
}
|
|
|
|
|
@@ -936,6 +950,10 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
|
amount_m3 AS trend_month3,
|
|
|
amount_m6 AS trend_month6,
|
|
|
amount_sum AS trend_total,
|
|
|
+ round(if(first_new_user_amount_count > 0, cost / first_new_user_amount_count, 0), 4) as first_recharge_count_cost,
|
|
|
+ round(if(old_amount_count > 0, cost / old_amount_count, 0), 4) as old_user_recharge_count_cost,
|
|
|
+ round(if(amount_count > 0, cost / amount_count, 0), 4) as show_recharge_count_cost,
|
|
|
+ round(if(new_user_total_amount_count > 0, cost / new_user_total_amount_count, 0), 4) as new_user_recharge_count_cost,
|
|
|
hundred_user_num,
|
|
|
hundred_user_num_cost
|
|
|
from
|
|
@@ -1014,6 +1032,10 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
|
round(if(sum(first_new_user_amount_num) > 0, sum(first_new_user_amount) / sum(first_new_user_amount_num), 0), 4) as first_recharge_arpu,
|
|
|
round(if(sum(new_user_total_amount_num) > 0, sum(new_user_total_amount) / sum(new_user_total_amount_num), 0), 4) as today_recharge_arpu,
|
|
|
round(if(sum(amount_num) > 0, sum(amount) / sum(amount_num), 0), 4) as show_recharge_arpu,
|
|
|
+ round(if(sum(first_new_user_amount_count) > 0, sum(cost) / sum(first_new_user_amount_count), 0), 4) as first_recharge_count_cost,
|
|
|
+ round(if(sum(old_amount_count) > 0, sum(cost) / sum(old_amount_count), 0), 4) as old_user_recharge_count_cost,
|
|
|
+ round(if(sum(amount_count) > 0, sum(cost) / sum(amount_count), 0), 4) as show_recharge_count_cost,
|
|
|
+ round(if(sum(new_user_total_amount_count) > 0, sum(cost) / sum(new_user_total_amount_count), 0), 4) as new_user_recharge_count_cost,
|
|
|
sum(hundred_user_num) as hundred_user_num,
|
|
|
round(if(sum(hundred_user_num) > 0, sum(cost) / sum(hundred_user_num), 0), 4) as hundred_user_num_cost
|
|
|
from
|
|
@@ -1103,6 +1125,8 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
|
round(if(sum(a.register_num) > 0, sum(a.new_user_total_amount) / sum(a.register_num), 0), 4) as new_reg_arpu,
|
|
|
round(if(sum(a.first_new_user_amount_num) > 0, sum(a.first_new_user_amount) / sum(a.first_new_user_amount_num), 0), 4) as first_recharge_arpu,
|
|
|
round(if(sum(a.new_user_total_amount_num) > 0, sum(a.new_user_total_amount) / sum(a.new_user_total_amount_num), 0), 4) as today_recharge_arpu,
|
|
|
+ round(if(sum(first_new_user_amount_count) > 0, sum(cost) / sum(first_new_user_amount_count), 0), 4) as first_recharge_count_cost,
|
|
|
+ round(if(sum(new_user_total_amount_count) > 0, sum(cost) / sum(new_user_total_amount_count), 0), 4) as new_user_recharge_count_cost,
|
|
|
sum(a.hundred_user_num) as hundred_user_num,
|
|
|
round(if(sum(a.hundred_user_num) > 0, sum(a.cost) / sum(a.hundred_user_num), 0), 4) as hundred_user_num_cost
|
|
|
from
|
|
@@ -1189,6 +1213,8 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
|
|
|
round(if(sum(a.register_num) > 0, sum(a.new_user_total_amount) / sum(a.register_num), 0), 4) as new_reg_arpu,
|
|
|
round(if(sum(a.first_new_user_amount_num) > 0, sum(a.first_new_user_amount) / sum(a.first_new_user_amount_num), 0), 4) as first_recharge_arpu,
|
|
|
round(if(sum(a.new_user_total_amount_num) > 0, sum(a.new_user_total_amount) / sum(a.new_user_total_amount_num), 0), 4) as today_recharge_arpu,
|
|
|
+ round(if(sum(first_new_user_amount_count) > 0, sum(cost) / sum(first_new_user_amount_count), 0), 4) as first_recharge_count_cost,
|
|
|
+ round(if(sum(new_user_total_amount_count) > 0, sum(cost) / sum(new_user_total_amount_count), 0), 4) as new_user_recharge_count_cost,
|
|
|
sum(a.hundred_user_num) as hundred_user_num,
|
|
|
round(if(sum(a.hundred_user_num) > 0, sum(a.cost) / sum(a.hundred_user_num), 0), 4) as hundred_user_num_cost
|
|
|
from
|