Prechádzať zdrojové kódy

fix : 权限修改提交1

bilingfeng 1 rok pred
rodič
commit
6ddf4f999c

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

@@ -21,7 +21,7 @@ public class ManageApplication {
 
     public static void main(String[] args) {
         SpringApplication.run(ManageApplication.class, args);
-        System.out.println("赞象Manage服务启动成功 <权限修改提交> ( ´・・)ノ(._.`) \n" +
+        System.out.println("赞象Manage服务启动成功 <权限修改提交1> ( ´・・)ノ(._.`) \n" +
                 "___  ___  ___   _   _   ___  _____  _____ \n" +
                 "|  \\/  | / _ \\ | \\ | | / _ \\|  __ \\|  ___|\n" +
                 "| .  . |/ /_\\ \\|  \\| |/ /_\\ \\ |  \\/| |__  \n" +

+ 3 - 3
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameAuthServiceImpl.java

@@ -151,19 +151,19 @@ public class GameAuthServiceImpl extends ServiceImpl<GameAuthMapper, GameAuth> i
         //超管权限
         if (SecurityUtil.isAdmin()) {
             List<Long> gameIdList = super.list(new LambdaQueryWrapper<GameAuth>()
-                    .eq(Strings.isNotBlank(userId), GameAuth::getUserId, userId)
+                    .eq(Strings.isNotBlank(userId), GameAuth::getUserId, Long.valueOf(userId))
             ).stream().map(GameAuth::getGameId).collect(Collectors.toList());
             return Tuples.of("admin", gameIdList);
         }
         //非超管权限
         GameAuthRole gameAuthRole = gameAuthRoleService.getOne(new LambdaQueryWrapper<GameAuthRole>()
-                .eq(GameAuthRole::getUserId, userId));
+                .eq(Strings.isNotBlank(userId),GameAuthRole::getUserId, Long.valueOf(userId)));
         if (gameAuthRole == null) {
             throw new BaseException("参数错误, 无法查询到用户的权限角色信息");
         }
         List<Long> gameIdList = super.list(new LambdaQueryWrapper<GameAuth>()
                 .eq(Strings.isBlank(userId), GameAuth::getUserId, SecurityUtil.getUserId())
-                .eq(Strings.isNotBlank(userId), GameAuth::getUserId, userId)
+                .eq(Strings.isNotBlank(userId), GameAuth::getUserId, Long.valueOf(userId))
         ).stream().map(GameAuth::getGameId).collect(Collectors.toList());
         //返回角色权限以及游戏
         return Tuples.of(gameAuthRole.getAuthType(), gameIdList);