wcc 1 سال پیش
والد
کامیت
39d4d7bb02

+ 6 - 6
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AdsAccountRechargeRankingServiceImpl.java

@@ -54,16 +54,16 @@ public class AdsAccountRechargeRankingServiceImpl implements IAdsAccountRecharge
                 sum(reg_user_cnt) as reg_user_cnt,
                 sum(cost) / sum(reg_user_cnt) as reg_cost,
                 sum(first_role) as first_role,
-                max(total_role) as total_role,
+                sum(total_role) as total_role,
                 sum(first_amount) as first_amount,
                 sum(first_amount_user) as first_amount_user,
                 sum(first_amount_count) as first_amount_count,
-                max(total_amount) as total_amount,
-                max(total_amount_user) as total_amount_user,
-                max(total_amount_count) as total_amount_count,
+                sum(total_amount) as total_amount,
+                sum(total_amount_user) as total_amount_user,
+                sum(total_amount_count) as total_amount_count,
                 sum(cost) / sum(first_amount) as first_roi,
-                max(total_amount) / max(total_amount_count) as avg_amount,
-                max(total_amount) / sum(cost) as roi
+                sum(total_amount) / sum(total_amount_count) as avg_amount,
+                sum(total_amount) / sum(cost) as roi
                 from ads_account_recharge_ranking
                 """;
         SimpleCriteria cri = Cnd.cri();

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

@@ -50,7 +50,7 @@ public class AdsAgentRechargeRankingServiceImpl implements IAdsAgentRechargeRank
                 max(total_recharge_amount) as total_recharge_amount,
                 max(total_recharge_num) as total_recharge_num,
                 max(total_recharge_count) as total_recharge_count,
-                sum(total_cost) as total_cost,
+                max(total_cost) as total_cost,
                 max(total_recharge_amount) / max(total_recharge_count) as avg_amount,
                 if (sum(total_cost) > 0, max(total_recharge_amount) / sum(total_cost), '0') as roi
                 from ads_agent_recharge_ranking