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