|  | @@ -1352,14 +1352,14 @@ public class RoleManageServiceImpl implements IRoleManageService {
 | 
											
												
													
														|  |                  from (select a.country,
 |  |                  from (select a.country,
 | 
											
												
													
														|  |                                        a.game_id,
 |  |                                        a.game_id,
 | 
											
												
													
														|  |                                        a.server_name,
 |  |                                        a.server_name,
 | 
											
												
													
														|  | -                                      IFNULL(c.role_total_amount, 0) as role_total_amount,
 |  | 
 | 
											
												
													
														|  | 
 |  | +                                      IFNULL(c.amount, 0) as role_total_amount,
 | 
											
												
													
														|  |                                        if(b.role_level <= 13, 0, 1)      as country_level,
 |  |                                        if(b.role_level <= 13, 0, 1)      as country_level,
 | 
											
												
													
														|  |                                        if(d.role_id is not null, 1, 0) as active,
 |  |                                        if(d.role_id is not null, 1, 0) as active,
 | 
											
												
													
														|  |                                        a.server_id,
 |  |                                        a.server_id,
 | 
											
												
													
														|  |                                        concat(a.country,',',a.server_id) as cs
 |  |                                        concat(a.country,',',a.server_id) as cs
 | 
											
												
													
														|  |                                 from dm_game_order.t_server_country a
 |  |                                 from dm_game_order.t_server_country a
 | 
											
												
													
														|  |                                          left join dm_game_order.t_game_user_role b on a.country = b.country and a.server_id = b.server_id
 |  |                                          left join dm_game_order.t_game_user_role b on a.country = b.country and a.server_id = b.server_id
 | 
											
												
													
														|  | -                                        left join game_ads.ads_role_amount c on c.role_id = b.role_id
 |  | 
 | 
											
												
													
														|  | 
 |  | +                                        left join game_dw.dw_order_day_amount c on c.role_id = b.role_id
 | 
											
												
													
														|  |                                 	left join (
 |  |                                 	left join (
 | 
											
												
													
														|  |                  	select role_id,ROW_NUMBER()over(partition by role_id) as num from game_dw.dw_active_log
 |  |                  	select role_id,ROW_NUMBER()over(partition by role_id) as num from game_dw.dw_active_log
 | 
											
												
													
														|  |                  	where game_id in (35,36,10035)
 |  |                  	where game_id in (35,36,10035)
 |