소스 검색

角色添加国家属性

Letianhua 1 년 전
부모
커밋
705c71b667

+ 5 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/PlayerRoleDataVO.java

@@ -212,4 +212,9 @@ public class PlayerRoleDataVO {
     @ApiModelProperty(notes = "注册充值时间差(秒)")
     private Long regPayTimeDiff;
 
+    /**
+     * 角色国家属性
+     */
+    @ApiModelProperty(notes = "角色国家属性")
+    private String country;
 }

+ 3 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/PlayerDataServiceImpl.java

@@ -849,6 +849,7 @@ public class PlayerDataServiceImpl implements IPlayerDataService {
                 		a.role_id , -- 角色ID
                 		a.role_name , -- 角色名
                 		a.role_level , -- 角色等级
+                		a.country, -- 国家属性
                 		a.combat_num as role_power, -- 角色攻击力
                 		a.role_vip as role_vip_level, -- 角色vip
                 		a.os , -- 角色操作系统
@@ -974,6 +975,7 @@ public class PlayerDataServiceImpl implements IPlayerDataService {
                 		a.role_id , -- 角色ID
                 		a.role_name , -- 角色名
                 		a.role_level , -- 角色等级
+                		a.country, -- 国家属性
                 		a.combat_num as role_power, -- 角色攻击力
                 		a.role_vip as role_vip_level, -- 角色vip
                 		a.os , -- 角色操作系统
@@ -1100,6 +1102,7 @@ public class PlayerDataServiceImpl implements IPlayerDataService {
                 		a.role_id , -- 角色ID
                 		a.role_name , -- 角色名
                 		a.role_level , -- 角色等级
+                		a.country, -- 国家属性
                 		a.combat_num as role_power, -- 角色攻击力
                 		a.role_vip as role_vip_level, -- 角色vip
                 		a.os , -- 角色操作系统

+ 14 - 3
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/RoleManageServiceImpl.java

@@ -179,6 +179,9 @@ public class RoleManageServiceImpl implements IRoleManageService {
             if ("null".equals(map.get("user_phone"))) {
                 map.put("user_phone", null);
             }
+            if ("null".equals(map.get("country"))) {
+                map.put("country", null);
+            }
             return map;
         }).collect(Collectors.toList());
 
@@ -195,13 +198,13 @@ public class RoleManageServiceImpl implements IRoleManageService {
     public Page<Map> getRoleCombatRanking(RoleCombatRankingDTO dto) {
 
         //是否查询合服数据(默认查询合服数据)
-        Boolean isQueryMerge = true;
+        boolean isQueryMerge = true;
         //如果不传值,查看的是原始服数据
-        if (dto.getIsMergeServer() == null || dto.getIsMergeServer() == Boolean.FALSE) {
+        if (dto.getIsMergeServer() == null || Boolean.FALSE.equals(dto.getIsMergeServer())) {
             isQueryMerge = false;
         }
         //是否查询超父游戏数据(默认查询超父游戏数据)
-        Boolean isSuperParentGame = true;
+        boolean isSuperParentGame = true;
         if (dto.getParentGameId() != null) {
             isSuperParentGame = false;
         }
@@ -794,6 +797,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
                 		a.os as os, -- 角色操作系统
                 		b.role_level as role_level, -- 角色等级
                 		b.combat_num as combat_num, -- 角色攻击力
+                		a.country as country, -- 国家属性
                 		IFNULL(c.amount, 0) as amount, -- 角色累计充值金额
                 		IFNULL(c.amount_count, 0) as amount_count, -- 角色累计充值次数
                 		ROUND(IF(c.amount_count > 0, c.amount / c.amount_count, 0), 2) as avg_amount, -- 平均单价
@@ -882,6 +886,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
                 				a.role_name,
                 				a.create_time,
                 				a.os,
+                				a.country,
                 				ROW_NUMBER()over(partition by a.role_id , a.source_system order by a.create_time asc, a.user_id asc) as num
                 			FROM dm_game_order.t_game_user_role a
                 			LEFT JOIN dm_game_order.t_game_user b on a.source_system = b.source_system AND a.user_id = b.id
@@ -1189,6 +1194,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
                         a.os as os, -- 角色操作系统
                         b.role_level as role_level, -- 角色等级
                         b.combat_num as combat_num, -- 角色攻击力
+                        a.country as country, -- 国家属性
                         IFNULL(c.amount, 0) as amount, -- 角色累计充值金额
                         IFNULL(c.amount_count, 0) as amount_count, -- 角色累计充值次数
                         ROUND(IF(c.amount_count > 0, c.amount / c.amount_count, 0), 2) as avg_amount, -- 平均单价
@@ -1277,6 +1283,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
                                 a.role_name,
                                 a.create_time,
                                 a.os,
+                                a.country,
                                 ROW_NUMBER()over(partition by a.role_id , a.source_system order by a.create_time asc, a.user_id asc) as num
                             FROM dm_game_order.t_game_user_role a
                             LEFT JOIN dm_game_order.t_game_user b on a.source_system = b.source_system AND a.user_id = b.id
@@ -3197,6 +3204,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
                 		a.role_id ,
                 		b.role_name,
                 		a.role_level ,
+                		b.country,
                 		a.role_vip ,
                 		a.total_amount ,
                 		a.combat_num ,
@@ -3232,6 +3240,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
                 			a.role_id,
                 			a.role_name,
                 			a.role_level,
+                			a.country,
                 			a.combat_num ,
                 			a.game_id ,
                 			b.parent_game_id,
@@ -3271,6 +3280,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
                 		a.role_vip ,
                 		a.total_amount ,
                 		a.combat_num ,
+                		b.country,
                 		ROW_NUMBER()over(partition by a.source_system ,a.boss_server_id ,a.super_game_id order by a.combat_num desc) as rank_num
                 	FROM (
                 		SELECT
@@ -3293,6 +3303,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
                 			a.role_name,
                 			a.role_level,
                 			a.combat_num ,
+                			a.country,
                 			a.game_id ,
                 			b.parent_game_id,
                 			b.super_game_id ,