Browse Source

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

bilingfeng 3 months ago
parent
commit
32f9031d1f

+ 29 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/RoleManageServiceImpl.java

@@ -1552,6 +1552,10 @@ public class RoleManageServiceImpl implements IRoleManageService {
                 	    i.user_create_time as user_create_time, -- 玩家注册时间
                 	    i.user_reg_game_id as user_reg_game_id, -- 玩家注册游戏id
                 	    i.user_reg_game_name as user_reg_game_name, -- 玩家注册游戏名
+                	    i.ip_city, -- 注册城市
+                	    i.ip_prov,  -- 注册归属地
+                	    i.login_ip_city,  -- 登录城市
+                	    i.login_ip_prov, -- 登录归属地
                 	    x.agent_id as agent_id, -- 玩家注册渠道id
                 	    IF(x.agent_id = 0 , '自然量', y.agent_name) as agent_name, -- 玩家注册渠道名
                 	    y.put_user_id as put_user_id, -- 投手id
@@ -1739,6 +1743,10 @@ public class RoleManageServiceImpl implements IRoleManageService {
                             i.reg_email as reg_email,
                             i.user_create_time as user_create_time,
                             i.user_reg_game_id as user_reg_game_id,
+                            i.ip_prov,
+                            i.ip_city,
+                            ix.login_ip_prov,
+                            ix.login_ip_city,
                             k.game_name as user_reg_game_name,
                             l.update_time as user_active_time,
                             m.user_last_recharge_game_id as user_last_recharge_game_id,
@@ -1760,10 +1768,31 @@ public class RoleManageServiceImpl implements IRoleManageService {
                                     reg_email ,
                                     create_time as user_create_time,
                                     game_id as user_reg_game_id,
+                                    ip_prov,
+                                    ip_city,
                                     ROW_NUMBER()over(partition by association_user_id, source_system order by create_time desc, id asc) as num
                                 FROM dm_game_order.t_game_user
                             ) z WHERE z.num = 1
                         ) i
+                        LEFT JOIN (
+                                            -- 玩家登录ip
+                                                SELECT
+                                                zx.user_id,
+                                                zx.ip_prov as login_ip_prov,
+                                                zx.ip_city as login_ip_city,
+                                                zx.source_system
+                                                FROM
+                                                (
+                                                   select
+                                                   user_id,
+                                                   ip_prov,
+                                                   ip_city,
+                                                   source_system,
+                                                   ROW_NUMBER()over(partition by user_id, source_system order by create_time desc, id asc) as num
+                                                   from
+                                                   dm_game_order.t_user_login_log
+                                                ) zx WHERE zx.num = 1
+                                        ) ix on i.source_system = ix.source_system AND i.association_user_id = ix.user_id
                         LEFT JOIN (
                             SELECT
                                 -- 玩家注册游戏名