0

尝试在目录中按姓氏搜索用户。使用以下查询

AndFilter andFilter = new AndFilter(); andFilter.append(new EqualsFilter(LDAPAttributeConstants.LAST_NAME, userInformation.getLastName())); List searchList = ldapTemplate.search(appContainer, andFilter.encode(), controls, new UserDetailsMapper());

获取同一用户的多个重复值作为响应。检查目录,只有一个这样的用户存在。如何停止返回的重复值?并且根本不显示具有相同姓氏的其他用户...查询有问题...?...请帮助

例如响应得到: 0: { "userId": "TestA123" "firstName": "abc" "lastName": "def" "emailId": "abcdef@gmail.com" "guid": "b%25252525252525252525252525252525252525252525252525252525252FrkUA1%25252525252525252525252525252525252525252525252525252525252xQABAeKAziw%25252525252525252525252525252525252525252525252525252525253D%25252525252525252525252525252525252525252525252525252525253D" }- 1: { "userId": "TestA123" "firstName": "abc" "lastName": "def" "emailId": "abcdef@gmail.com" "guid": "b%25252525252525252525252525252525252525252525252525252525252FrkUA1%25252525252525252525252525252525252525252525252525252525252xQABAeKAziw%25252525252525252525252525252525252525252525252525252525253D%25252525252525252525252525252525252525252525252525252525253D" }- 2: { "userId": "TestA123" "firstName": "abc" "lastName": "def" "emailId": "abcdef@gmail.com" "guid" : "b%25252525252525252525252525252525252525252525252525252525252FrkUA1%25252525252525252525252525252525252525252525252525252525252xQABAeKAziw%25252525252525252525252525252525252525252525252525252525253D%25252525252525252525252525252525252525252525252525252525253D" }- 3: { "userId": "TestA123" "firstName": "abc" "lastName": "def" "emailId": "abcdef@gmail.com" "guid": "b%25252525252525252525252525252525252525252525252525252525252FrkUA1%25252525252525252525252525252525252525252525252525252525252xQABAeKAziw%25252525252525252525252525252525252525252525252525252525253D%25252525252525252525252525252525252525252525252525252525253D" }

4

0 回答 0