fix
This commit is contained in:
parent
4d7a2edeea
commit
cc1b2a657b
|
@ -43,6 +43,9 @@ func (l *GetLdapUserInfoLogic) GetLdapUserInfo(req *types.GetLdapUserInfoReq, us
|
|||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "获取用户信息失败:"+err.Error())
|
||||
}
|
||||
if len(res.Entries) > 1 {
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "查询到的不是用户信息")
|
||||
}
|
||||
isUser := false
|
||||
apiRsp := types.GetLdapUserInfoRsp{
|
||||
UserId: 0,
|
||||
|
@ -59,7 +62,7 @@ func (l *GetLdapUserInfoLogic) GetLdapUserInfo(req *types.GetLdapUserInfoReq, us
|
|||
}
|
||||
}
|
||||
if !isUser {
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "查询到的不是用户信息")
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "查询到的不是用户信息!!")
|
||||
}
|
||||
case "uidNumber": //用户id
|
||||
if len(attr.Values) == 0 {
|
||||
|
@ -90,6 +93,9 @@ func (l *GetLdapUserInfoLogic) GetLdapUserInfo(req *types.GetLdapUserInfoReq, us
|
|||
}
|
||||
}
|
||||
}
|
||||
if apiRsp.UserId == 0 {
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "查询到的不是用户信息!!!")
|
||||
}
|
||||
return resp.SetStatusWithMessage(basic.CodeOK, "success", apiRsp)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user