| 
					
				 | 
			
			
				@@ -5271,6 +5271,9 @@ public class GameDataServiceImpl implements IGameDataService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //渠道单独的查询条件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Criteria agentCri = getAgentQueryStr(dto); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //昨日总充值金额查询条件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Criteria yesterdayTotalAmountCri = getYesterdayTotalAmountQueryStr(dto); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //查询总记录数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Sql countSql = Sqls.create(getCountNumSql(cri,agentCri)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         countSql.setCallback(Sqls.callback.integer()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -5278,7 +5281,7 @@ public class GameDataServiceImpl implements IGameDataService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         pager.setRecordCount(countSql.getInt()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //查询sql 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        Sql sql = Sqls.create(flowMonitorSql(cri,agentCri)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Sql sql = Sqls.create(flowMonitorSql(cri,agentCri,yesterdayTotalAmountCri)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //设置自定义回传类型 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sql.setCallback(Sqls.callback.entities()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sql.setEntity(dao.getEntity(FlowMonitorVO.class)); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -5318,6 +5321,50 @@ public class GameDataServiceImpl implements IGameDataService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * 昨日总充值金额查询条件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @param dto 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private Criteria getYesterdayTotalAmountQueryStr(FlowMonitorDTO dto) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Criteria cri = Cnd.cri(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //SDK类型 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (StringUtils.isNotBlank(dto.getSourceSystem())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            cri.where().andEquals("source_system", dto.getSourceSystem()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String gameColumn = "game_id"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (dto.getGameDimension() != 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            gameColumn = "parent_game_id"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //拼接游戏ID 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (CollectionUtils.isNotEmpty(dto.getGameId())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            cri.where().andInList(gameColumn, dto.getGameId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(dto.getCostBeginDate()!=null && dto.getCostEndDate()!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            cri.where().andBetween("to_date(reg_time)", dto.getCostBeginDate(), dto.getCostEndDate()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //拼接投手ID 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (CollectionUtils.isNotEmpty(dto.getPitcherId())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            cri.where().andInList("pitcher_id", dto.getPitcherId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //拼接渠道ID 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (CollectionUtils.isNotEmpty(dto.getAgentId())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            cri.where().andInList("agent_id", dto.getAgentId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //拼接广告账号id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (CollectionUtils.isNotEmpty(dto.getAccountId())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            cri.where().andInList("account_id", dto.getAccountId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return cri; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public Double getCostCount(FlowMonitorDTO dto){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //根据维度选择 子表父表 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -5646,7 +5693,7 @@ public class GameDataServiceImpl implements IGameDataService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @param cri 条件 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      * @return sql 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public String flowMonitorSql(Criteria cri,Criteria agentCri){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public String flowMonitorSql(Criteria cri,Criteria agentCri,Criteria yesterdayTotalAmountCri){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String sql  = """ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 select day as order_date, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -5759,7 +5806,7 @@ public class GameDataServiceImpl implements IGameDataService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                 account_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                 sum(amount) yesterday_amount -- 昨日 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                          from game_dw.dw_order_day_amount 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                                         """ + cri + """ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                         """ + yesterdayTotalAmountCri + """ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                          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)) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -5849,7 +5896,7 @@ public class GameDataServiceImpl implements IGameDataService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                 account_type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                 sum(amount) yesterday_amount -- 昨日 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                          from game_dw.dw_order_day_amount 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                                         """ + cri + """ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                                         """ + yesterdayTotalAmountCri + """ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                          and order_agent_id = 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                          group by source_system, day, pitcher_id, order_agent_id, account_id, parent_game_id, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                                                   account_type) e 
			 |