Merge remote-tracking branch 'origin/main'

This commit is contained in:
wr
2026-04-02 10:45:08 +08:00
4 changed files with 271 additions and 29 deletions

View File

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