zhangxianyu пре 1 недеља
родитељ
комит
24b9f5bb05

+ 13 - 12
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/RoleManageServiceImpl.java

@@ -1206,7 +1206,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
         Criteria criteria = Cnd.cri();
         criteria.where().andInStrList("a.role_id", roleId);
         criteria.where().andEquals("a.source_system", "ZX_ONE");
-        criteria.where().andInList("a.game_id", Arrays.asList(35L, 36L, 10035L));
+        criteria.where().andInList("c.super_game_id", List.of(12L));
         String roleDetailListSql = getRoleDetailListSql(criteria);
         Sql sql = Sqls.create(roleDetailListSql);
         sql.setCallback(Sqls.callback.maps());
@@ -1392,7 +1392,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
         if (StringUtils.isNotEmpty(dto.getServerId())) {
             cri.where().andEquals("a.server_id", dto.getServerId());
         }
-        cri.where().andInList("a.game_id", Arrays.asList(35L, 36L, 10035L));
+        cri.where().andInList("b.order_super_game_id", List.of(12L));
         if (dto.getCountryLevel() != null && dto.getCountryLevel() == 0) {
             cri.where().andLTE("a.role_level", 13);
         }
@@ -1461,21 +1461,22 @@ public class RoleManageServiceImpl implements IRoleManageService {
     private String getCountryDataListSql(GameCountryParamDTO dto) {
         Criteria criA = Cnd.cri();
         if (CollectionUtils.isNotEmpty(dto.getGameId())) {
-            criA.where().andInList("game_id", dto.getGameId());
+            criA.where().andInList("a.game_id", dto.getGameId());
         }
         if (CollectionUtils.isNotEmpty(dto.getServerId())) {
-            criA.where().andInStrList("server_id", dto.getServerId());
+            criA.where().andInStrList("a.server_id", dto.getServerId());
         }
-        criA.where().andNotIsNull("country");
-        criA.where().andNotEquals("country", "");
-        criA.where().andNotEquals("country", "null");
-        criA.where().andInList("game_id", Arrays.asList(35L, 36L, 10035L));
-        criA.where().andNotEquals("server_id", "999");
+        criA.where().andNotIsNull("a.country");
+        criA.where().andNotEquals("a.country", "");
+        criA.where().andNotEquals("a.country", "null");
+        criA.where().andInList("b.super_game_id", List.of(12L));
+        criA.where().andNotEquals("a.server_id", "999");
         return """
-                select concat(country,',',server_id) 
-                from dm_game_order.t_game_user_role 
+                select concat(a.country,',',a.server_id)
+                from dm_game_order.t_game_user_role a
+                left join dm_game_order.t_game b on a.game_id = b.id and b.source_system = 'ZX_ONE'
                 """ + criA + """
-                group by country,server_id order by count(role_id) desc limit 4
+                group by a.country,a.server_id order by count(a.role_id) desc limit 4
                   """;
     }