Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -580,7 +580,15 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
||||
if (CollectionUtil.isEmpty(ids)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return this.baseMapper.getUserVOByIdList(ids);
|
||||
List<UserVO> list = this.baseMapper.getUserVOByIdList(ids);
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
list.forEach(item->{
|
||||
List<Role> roles = userRoleService.getRoleListByUserId(item.getId());
|
||||
item.setRoleList(roles.stream().map(Role::getId).collect(Collectors.toList()));
|
||||
item.setRoleCode(roles.stream().map(Role::getCode).collect(Collectors.toList()));
|
||||
});
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user