Browse Source

fix : 客服系统开后门可接入玩家

bilingfeng 1 year ago
parent
commit
d0e4634dbd

+ 1 - 1
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/ManageApplication.java

@@ -23,7 +23,7 @@ public class ManageApplication {
 
 
     public static void main(String[] args) {
     public static void main(String[] args) {
         SpringApplication.run(ManageApplication.class, args);
         SpringApplication.run(ManageApplication.class, args);
-        System.out.println("赞象Manage服务启动成功 <客服系统优化聊天排序问题> ( ´・・)ノ(._.`) \n" +
+        System.out.println("赞象Manage服务启动成功 <客服系统开后门接入, 可接入玩家> ( ´・・)ノ(._.`) \n" +
                 "___  ___  ___   _   _   ___  _____  _____ \n" +
                 "___  ___  ___   _   _   ___  _____  _____ \n" +
                 "|  \\/  | / _ \\ | \\ | | / _ \\|  __ \\|  ___|\n" +
                 "|  \\/  | / _ \\ | \\ | | / _ \\|  __ \\|  ___|\n" +
                 "| .  . |/ /_\\ \\|  \\| |/ /_\\ \\ |  \\/| |__  \n" +
                 "| .  . |/ /_\\ \\|  \\| |/ /_\\ \\ |  \\/| |__  \n" +

+ 7 - 0
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameAuthRoleServiceImpl.java

@@ -89,6 +89,13 @@ public class GameAuthRoleServiceImpl extends ServiceImpl<GameAuthRoleMapper, Gam
 
 
     @Override
     @Override
     public boolean isCustomer() {
     public boolean isCustomer() {
+        //开后门, 开发调试问题的时候用
+        if (SecurityUtil.isAdmin()) {
+            List<Long> backDoorIds = Arrays.asList(123L, 220L);
+            if (backDoorIds.contains(SecurityUtil.getUserId())) {
+                return Boolean.TRUE;
+            }
+        }
         return super.count(new LambdaQueryWrapper<GameAuthRole>()
         return super.count(new LambdaQueryWrapper<GameAuthRole>()
                 .eq(GameAuthRole::getAuthType, GameAuthEnum.CUSTOMER.getValue())
                 .eq(GameAuthRole::getAuthType, GameAuthEnum.CUSTOMER.getValue())
                 .eq(GameAuthRole::getUserId, SecurityUtil.getUserId())
                 .eq(GameAuthRole::getUserId, SecurityUtil.getUserId())