fix:userinfo返回角色编码

This commit is contained in:
2026-02-03 20:34:12 +08:00
parent 28fddc4332
commit 4a2f995584
3 changed files with 48 additions and 39 deletions

View File

@@ -829,6 +829,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUserEntity
List<Long> roleIds = sysRoleList.stream().map(SysRoleVO::getRoleId).collect(Collectors.toList());
result.setRoles(roleIds);
List<String> roleCodes = sysRoleList.stream().map(SysRoleVO::getRoleCode).collect(Collectors.toList());
result.setRoleCodes(roleCodes);
// 获取功能编码相关
R<List<String>> functionCodeReturn = honeycomTenantServiceFeign.findFunctionCodesByRoleId(userInfo.getUserId(), String.valueOf(loginDefaultStaff.getTenantId()), SecurityConstants.FROM_IN);
if (Objects.isNull(functionCodeReturn) || !functionCodeReturn.isOk()) {