Browse Source

Merge remote-tracking branch 'origin/package' into package

wcc 1 year ago
parent
commit
39e1394bf4

+ 72 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GamePromoteDayTotalVO.java

@@ -206,9 +206,81 @@ public class GamePromoteDayTotalVO {
     @ApiModelProperty(notes = "账面Arpu=账面充值金额/账面充值人数")
     private BigDecimal showRechargeArpu;
 
+    @ApiModelProperty(notes = "不展示--付费趋势:1天")
+    private String trendDay1;
+
+    @ApiModelProperty(notes = "不展示--付费趋势:3天")
+    private String trendDay3;
+
+    @ApiModelProperty(notes = "不展示--付费趋势:5天")
+    private String trendDay5;
+
+    @ApiModelProperty(notes = "不展示--付费趋势:7天")
+    private String trendDay7;
+
+    @ApiModelProperty(notes = "不展示--付费趋势:15天")
+    private String trendDay15;
+
+    @ApiModelProperty(notes = "不展示--付费趋势:1个月")
+    private String trendMonth1;
+
+    @ApiModelProperty(notes = "不展示--付费趋势:2个月")
+    private String trendMonth2;
+
+    @ApiModelProperty(notes = "不展示--付费趋势:3个月")
+    private String trendMonth3;
+
+    @ApiModelProperty(notes = "不展示--付费趋势:6个月")
+    private String trendMonth6;
+
+    @ApiModelProperty(notes = "不展示--付费趋势:总")
+    private String trendTotal;
+
+    @ApiModelProperty(notes = "付费趋势:1天")
+    private RechargeTrendVO rechargeTrendDay1;
+
+    @ApiModelProperty(notes = "付费趋势:3天")
+    private RechargeTrendVO rechargeTrendDay3;
+
+    @ApiModelProperty(notes = "付费趋势:5天")
+    private RechargeTrendVO rechargeTrendDay5;
+
+    @ApiModelProperty(notes = "付费趋势:7天")
+    private RechargeTrendVO rechargeTrendDay7;
+
+    @ApiModelProperty(notes = "付费趋势:15天")
+    private RechargeTrendVO rechargeTrendDay15;
+
+    @ApiModelProperty(notes = "付费趋势:1个月")
+    private RechargeTrendVO rechargeTrendMonth1;
+
+    @ApiModelProperty(notes = "付费趋势:2个月")
+    private RechargeTrendVO rechargeTrendMonth2;
+
+    @ApiModelProperty(notes = "付费趋势:3个月")
+    private RechargeTrendVO rechargeTrendMonth3;
+
+    @ApiModelProperty(notes = "付费趋势:6个月")
+    private RechargeTrendVO rechargeTrendMonth6;
+
+    @ApiModelProperty(notes = "付费趋势:总")
+    private RechargeTrendVO rechargeTrendTotal;
+
     @ApiModelProperty(notes = "单日付费100+人数")
     private String hundredUserNum;
 
     @ApiModelProperty(notes = "单日付费100+成本")
     private String hundredUserNumCost;
+
+    @ApiModelProperty(notes = "首日充值次数成本=实际消耗/首日新用户充值次数")
+    private BigDecimal firstRechargeCountCost;
+
+    @ApiModelProperty(notes = "老用户充值次数成本 = 消耗/老用户充值次数")
+    private BigDecimal oldUserRechargeCountCost;
+
+    @ApiModelProperty(notes = "账面充值次数成本=消耗/账面充值次数")
+    private BigDecimal showRechargeCountCost;
+
+    @ApiModelProperty(notes = "新用户累计充值次数成本 = 消耗/新用户累计充值次数")
+    private BigDecimal newUserRechargeCountCost;
 }

+ 12 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GamePromoteDayVO.java

@@ -149,6 +149,9 @@ public class GamePromoteDayVO {
     @ApiModelProperty(notes = "老用户充值金额")
     private BigDecimal oldUserRechargeMoney;
 
+    @ApiModelProperty(notes = "老用户充值次数成本 = 消耗/老用户充值次数")
+    private BigDecimal oldUserRechargeCountCost;
+
     @ApiModelProperty(notes = "账面充值次数")
     private Long showRechargeCount;
 
@@ -158,6 +161,9 @@ public class GamePromoteDayVO {
     @ApiModelProperty(notes = "账面充值金额")
     private BigDecimal showRechargeMoney;
 
+    @ApiModelProperty(notes = "账面充值次数成本=消耗/账面充值次数")
+    private BigDecimal showRechargeCountCost;
+
     @ApiModelProperty(notes = "新用户累计充值次数")
     private Long newUserRechargeCount;
 
@@ -167,6 +173,9 @@ public class GamePromoteDayVO {
     @ApiModelProperty(notes = "新用户累计充值金额")
     private BigDecimal newUserRechargeMoney;
 
+    @ApiModelProperty(notes = "新用户累计充值次数成本 = 消耗/新用户累计充值次数")
+    private BigDecimal newUserRechargeCountCost;
+
     @ApiModelProperty(notes = "首日ROI=首日新用户充值金额/实际消耗")
     private BigDecimal firstRecoveryRate;
 
@@ -224,6 +233,9 @@ public class GamePromoteDayVO {
     @ApiModelProperty(notes = "首日充值成本=实际消耗/首日新用户充值人数")
     private BigDecimal firstRechargeCost;
 
+    @ApiModelProperty(notes = "首日充值次数成本=实际消耗/首日新用户充值次数")
+    private BigDecimal firstRechargeCountCost;
+
     @ApiModelProperty(notes = "买量充值成本=实际消耗/新用户累计充值人数")
     private BigDecimal buyUserRechargeCost;
 

+ 15 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GamePromoteTotalSumVO.java

@@ -241,4 +241,19 @@ public class GamePromoteTotalSumVO {
 
     @ApiModelProperty(notes = "单日付费100+成本")
     private String hundredUserNumCost;
+
+    @ApiModelProperty(notes = "新用户充值次数成本 = 消耗/新用户充值次数")
+    private BigDecimal userRechargeCountCost;
+
+    @ApiModelProperty(notes = "首日充值次数成本=实际消耗/首日新用户充值次数")
+    private BigDecimal firstRechargeCountCost;
+
+    @ApiModelProperty(notes = "老用户充值次数成本 = 消耗/老用户充值次数")
+    private BigDecimal oldUserRechargeCountCost;
+
+    @ApiModelProperty(notes = "账面充值次数成本=消耗/账面充值次数")
+    private BigDecimal showRechargeCountCost;
+
+    @ApiModelProperty(notes = "新用户累计充值次数成本 = 消耗/新用户累计充值次数")
+    private BigDecimal newUserRechargeCountCost;
 }

+ 15 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/GamePromoteTotalVO.java

@@ -273,4 +273,19 @@ public class GamePromoteTotalVO {
 
     @ApiModelProperty(notes = "单日付费100+成本")
     private String hundredUserNumCost;
+
+    @ApiModelProperty(notes = "新用户充值次数成本 = 消耗/新用户充值次数")
+    private BigDecimal userRechargeCountCost;
+
+    @ApiModelProperty(notes = "首日充值次数成本=实际消耗/首日新用户充值次数")
+    private BigDecimal firstRechargeCountCost;
+
+    @ApiModelProperty(notes = "老用户充值次数成本 = 消耗/老用户充值次数")
+    private BigDecimal oldUserRechargeCountCost;
+
+    @ApiModelProperty(notes = "账面充值次数成本=消耗/账面充值次数")
+    private BigDecimal showRechargeCountCost;
+
+    @ApiModelProperty(notes = "新用户累计充值次数成本 = 消耗/新用户累计充值次数")
+    private BigDecimal newUserRechargeCountCost;
 }

+ 6 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/PlayerRechargeRankingVO.java

@@ -115,4 +115,10 @@ public class PlayerRechargeRankingVO {
      */
     @ApiModelProperty("累计充值次数")
     private Long totalAmountCount;
+
+    @ApiModelProperty("角色名称")
+    private String roleName;
+
+    @ApiModelProperty("游戏服")
+    private String serverName;
 }

+ 26 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AccountAgentDayServiceImpl.java

@@ -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

+ 3 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/RankingServiceImpl.java

@@ -134,7 +134,9 @@ public class RankingServiceImpl implements IRankingService {
                 max(total_amount_count) as total_amount_count,
                 max(last_amount_game_id) as last_amount_game_id,
                 max(last_amount_game_name) as last_amount_game_name,
-                max(last_amount_time) as last_amount_time
+                max(last_amount_time) as last_amount_time,
+                max(role_name) as role_name,
+                max(server_name) as server_name
                 from ads_player_recharge_ranking
                 """;
     }