|
@@ -372,6 +372,12 @@ func (userService *UserService) GetUser(getUserQuery *query.GetUserQuery) (inter |
|
@@ -372,6 +372,12 @@ func (userService *UserService) GetUser(getUserQuery *query.GetUserQuery) (inter |
372
|
if userBase != nil {
|
372
|
if userBase != nil {
|
373
|
user.UserInfo = userBase.UserInfo
|
373
|
user.UserInfo = userBase.UserInfo
|
374
|
}
|
374
|
}
|
|
|
375
|
+ // TODO:后期可以移除有冗余roleType
|
|
|
376
|
+ for i := range user.UserRole {
|
|
|
377
|
+ if _, role, _ := factory.FastPgRole(transactionContext, user.UserRole[i].RoleId); role != nil {
|
|
|
378
|
+ user.UserRole[i].RoleType = role.RoleType
|
|
|
379
|
+ }
|
|
|
380
|
+ }
|
375
|
userDto := &dto.UserDto{Im: userBase.Im}
|
381
|
userDto := &dto.UserDto{Im: userBase.Im}
|
376
|
if err := userDto.LoadDto(user, company); err != nil {
|
382
|
if err := userDto.LoadDto(user, company); err != nil {
|
377
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
383
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|