【查询用户信息赋值默认角色】
This commit is contained in:
parent
d4a2074aab
commit
a327bea53b
@ -54,8 +54,8 @@ func FindUserInfo(userId int32) *dto.UserRspDto {
|
||||
}
|
||||
rspUser := dto.ConvertFromUserDto(user)
|
||||
roles := QueryAuthRoleByUid(user.ID)
|
||||
if len(roles) == 0 {
|
||||
return rspUser
|
||||
if len(roles) == 0 { // 如果没有指派用户时,指定普通用户信息
|
||||
roles = []*model.AuthRole{{ID: int32(dto.USER), Name: "普通用户"}}
|
||||
}
|
||||
rids := make([]int32, len(roles))
|
||||
for i, r := range roles {
|
||||
|
Loading…
Reference in New Issue
Block a user