|
@@ -78,9 +78,13 @@ public class UserServiceImpl extends ServiceImpl<IUserMapper, User> implements I
|
|
|
throw new BusinessException(ResultCode.PASSWORD_ERROR);
|
|
|
}
|
|
|
|
|
|
- List<UserPlatform> xspases = userPlatformService.list(new LambdaQueryWrapper<UserPlatform>().eq(UserPlatform::getUserId, user.getId()).eq(UserPlatform::getPlatformKey, "xspase"));
|
|
|
- if(CollUtil.isEmpty(xspases)){
|
|
|
- throw new BusinessException(XspaceErrorCode.CODE_90001.code(), XspaceErrorCode.CODE_90001.message());
|
|
|
+ List<UserRole> userRoles = userRoleService.getByUserId(user.getId());
|
|
|
+ boolean isPlatform = userRoles.stream().anyMatch(v -> v.getRoleId() == 5);
|
|
|
+ if(!isPlatform){
|
|
|
+ List<UserPlatform> xspases = userPlatformService.list(new LambdaQueryWrapper<UserPlatform>().eq(UserPlatform::getUserId, user.getId()).eq(UserPlatform::getPlatformKey, "xspase"));
|
|
|
+ if(CollUtil.isEmpty(xspases)){
|
|
|
+ throw new BusinessException(XspaceErrorCode.CODE_90001.code(), XspaceErrorCode.CODE_90001.message());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
String token = this.redisLogin(user.getUserName(), JSONObject.toJSONString(user),"user");
|