fix
This commit is contained in:
@@ -38,7 +38,12 @@ func (l *GetLdapUsersLogic) GetLdapUsers(req *types.GetLdapUsersReq, r *http.Req
|
||||
}
|
||||
req.PageCookie = strings.Trim(req.PageCookie, " ")
|
||||
pageSize := uint32(20)
|
||||
list, cookie, err := l.svcCtx.Ldap.GetLdapBaseTeamUserList(pageSize, req.PageCookie)
|
||||
filter := "(objectClass=person)"
|
||||
//有关键词就模糊搜索
|
||||
if req.UserName != "" {
|
||||
filter = "(&(objectClass=person)(sn=*" + req.UserName + "*))"
|
||||
}
|
||||
list, cookie, err := l.svcCtx.Ldap.GetLdapBaseTeamUserList(pageSize, filter, req.PageCookie)
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, "查询用户列表报错,"+err.Error())
|
||||
|
||||
Reference in New Issue
Block a user