作者 yangfu

用户详情 返回roleType

... ... @@ -372,6 +372,12 @@ func (userService *UserService) GetUser(getUserQuery *query.GetUserQuery) (inter
if userBase != nil {
user.UserInfo = userBase.UserInfo
}
// TODO:后期可以移除有冗余roleType
for i := range user.UserRole {
if _, role, _ := factory.FastPgRole(transactionContext, user.UserRole[i].RoleId); role != nil {
user.UserRole[i].RoleType = role.RoleType
}
}
userDto := &dto.UserDto{Im: userBase.Im}
if err := userDto.LoadDto(user, company); err != nil {
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
... ...
... ... @@ -127,6 +127,7 @@ func (role *Role) CloneSample() *Role {
RoleId: role.RoleId,
RoleName: role.RoleName,
Ext: role.Ext,
RoleType: role.RoleType,
}
}
... ...