|
@@ -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);
|