fix:userinfo返回角色编码
This commit is contained in:
@@ -32,4 +32,10 @@ public class SysUserInfoVO implements Serializable {
|
||||
@Schema(description = "角色标识集合")
|
||||
private List<Long> roles = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* 角色编码集合
|
||||
*/
|
||||
@Schema(description = "角色编码集合")
|
||||
private List<String> roleCodes = new ArrayList<>();
|
||||
|
||||
}
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user