消息修改
This commit is contained in:
+3
-3
@@ -525,17 +525,17 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
@Override
|
||||
public List<SysUser> getRolesUser(List<String> roleCode) {
|
||||
if(CollectionUtils.isEmpty(roleCode)){
|
||||
throw new JeroBootException("角色编码为空!");
|
||||
return null;
|
||||
}
|
||||
LambdaQueryWrapper<SysRole> queryRole = new LambdaQueryWrapper<>();
|
||||
queryRole.in(SysRole::getRoleCode,roleCode);
|
||||
List<SysRole> listSysRole = sysRoleMapper.selectList(queryRole);
|
||||
if(CollectionUtils.isEmpty(listSysRole)){
|
||||
throw new JeroBootException("角色不存在!");
|
||||
return null;
|
||||
}
|
||||
List<String> listRoleId = listSysRole.stream().map(SysRole::getId).collect(Collectors.toList());
|
||||
if(CollectionUtils.isEmpty(listRoleId)){
|
||||
throw new JeroBootException("角色不存在!");
|
||||
return null;
|
||||
}
|
||||
LambdaQueryWrapper<SysUserRole> querySysUserRole = new LambdaQueryWrapper<>();
|
||||
querySysUserRole.in(SysUserRole::getRoleId,listRoleId);
|
||||
|
||||
Reference in New Issue
Block a user