Переглянути джерело

fix : 增加充值流水日志-1

bilingfeng 1 тиждень тому
батько
коміт
b80ae950e8

+ 1 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/GameDataApplication.java

@@ -18,7 +18,7 @@ public class GameDataApplication {
 
     public static void main(String[] args) {
         SpringApplication.run(GameDataApplication.class, args);
-        System.out.println("游戏数据服务启动成功 增加充值流水日志 ( ´・・)ノ(._.`) \n" +
+        System.out.println("游戏数据服务启动成功 增加充值流水日志-1 ( ´・・)ノ(._.`) \n" +
                 " ______  __     __     \n" +
                 "/_____/\\/__/\\ /__/\\    \n" +
                 "\\:::__\\/\\ \\::\\\\:.\\ \\   \n" +

+ 2 - 104
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/GameDataServiceImpl.java

@@ -7836,26 +7836,15 @@ public class GameDataServiceImpl implements IGameDataService {
                                             ifnull(x.twentyfour_amount, 0) twentyfour_amount,
                                             ifnull(e.yesterday_amount, 0)  yesterday_amount
                                      from (
-                                            select source_system,
-                                                  dt as day,
-                                                  pitcher_id,
-                                                  agent_id,
-                                                  account_id,
-                                                  game_id,
-                                                  account_type
-                                            from game_dw.dw_agent_day
-                                            """ + agentCri + """
-                group by source_system, dt, pitcher_id, agent_id,account_id, game_id, account_type
-                ) a left join (
                                 select
                                    source_system,
                                    day,
                                    pitcher_id,
                                    zx_pitcher_name pitcher_name,
-                                   order_agent_id,
+                                   order_agent_id as agent_id,
                                    agent_name,
                                    account_id,
-                                   parent_game_id,
+                                   parent_game_id as game_id,
                                    account_type,
                                    sum(amount)     twentyfour_amount
                             from game_dw.dw_order_day_amount
@@ -7927,97 +7916,6 @@ public class GameDataServiceImpl implements IGameDataService {
                                                                 and a.agent_id = e.order_agent_id
                                                                 and a.game_id=e.parent_game_id
                                     
-                union all
-                                    
-                select a.source_system,
-                                            a.day,
-                                            ifnull(b.ten_amount, 0)        ten_amount,
-                                            ifnull(c.fourteen_amount, 0)   fourteen_amount,
-                                            ifnull(d.seventeen_amount, 0)  seventeen_amount,
-                                            ifnull(a.twentyfour_amount, 0) twentyfour_amount,
-                                            ifnull(e.yesterday_amount, 0)  yesterday_amount
-                                     from (
-                                             select
-                                                              source_system,
-                                                              day,
-                                                              pitcher_id,
-                                                              zx_pitcher_name pitcher_name,
-                                                              order_agent_id,
-                                                              agent_name,
-                                                              account_id,
-                                                              parent_game_id,
-                                                              account_type,
-                                                              sum(amount)     twentyfour_amount
-                                                       from game_dw.dw_order_day_amount
-                                                       """ + cri + """
-                         and order_agent_id = 0
-                         group by source_system, day, pitcher_id, zx_pitcher_name, order_agent_id, agent_name,
-                                  account_id, parent_game_id, account_type
-                   )a
-                left join (
-                             select
-                                  source_system,
-                                  day,
-                                  pitcher_id,
-                                  order_agent_id,
-                                  account_id,
-                                  parent_game_id,
-                                  account_type,
-                                  sum(amount) ten_amount -- 10
-                           from game_dw.dw_order_day_amount
-                           """ + cri + """
-                                and hour(order_create_time) < 10 and order_agent_id=0
-                                group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
-                                         account_type) b
-                               on a.source_system = b.source_system and a.day = b.day and a.order_agent_id = b.order_agent_id
-                and a.parent_game_id=b.parent_game_id
-                     left join (select source_system,
-                                       day,
-                                       pitcher_id,
-                                       order_agent_id,
-                                       account_id,
-                                       parent_game_id,
-                                       account_type,
-                                       sum(amount) fourteen_amount -- 14
-                                from game_dw.dw_order_day_amount
-                                """ + cri + """
-                                and hour(order_create_time) < 14 and order_agent_id = 0
-                                group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
-                                         account_type) c
-                               on a.source_system = c.source_system and a.day = c.day and a.order_agent_id = c.order_agent_id
-                and a.parent_game_id=c.parent_game_id
-                     left join (select source_system,
-                                       day,
-                                       pitcher_id,
-                                       order_agent_id,
-                                       account_id,
-                                       parent_game_id,
-                                       account_type,
-                                       sum(amount) seventeen_amount -- 17
-                                from game_dw.dw_order_day_amount
-                                """ + cri + """
-                                and hour(order_create_time) < 17 and order_agent_id = 0
-                                group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
-                                         account_type) d
-                               on a.source_system = d.source_system and a.day = d.day and a.order_agent_id = d.order_agent_id
-                and a.parent_game_id=d.parent_game_id
-                     left join (select source_system,
-                                       day,
-                                       pitcher_id,
-                                       order_agent_id,
-                                       account_id,
-                                       parent_game_id,
-                                       account_type,
-                                       sum(amount) yesterday_amount -- 昨日
-                                from game_dw.dw_order_day_amount
-                                """ + yesterdayTotalAmountCri + """
-                                                         and order_agent_id = 0
-                                                         group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id,
-                                                                  account_type) e
-                                                        on a.source_system = e.source_system and a.day = Date(adddate(e.day, 1))
-                                                                and a.order_agent_id = e.order_agent_id
-                                                                and a.parent_game_id=e.parent_game_id
-                                    
                 ) f
                                group by day, source_system
                      ) ab