Commit 92e811f7 authored by LabelZhou's avatar LabelZhou Committed by Jason Song

fix ldap findByUserIds error (#1910)

Fix the issue 'Container type has already been specified as AND, cannot change it to OR'
parent 5e39268d
......@@ -84,10 +84,9 @@ public class LdapUserService implements UserService {
if (CollectionUtils.isEmpty(userIds)) {
return null;
} else {
ContainerCriteria criteria = ldapQueryCriteria()
.and(query().where(loginIdAttrName).is(userIds.get(0)));
ContainerCriteria criteria = query().where(loginIdAttrName).is(userIds.get(0));
userIds.stream().skip(1).forEach(userId -> criteria.or(loginIdAttrName).is(userId));
return ldapTemplate.search(criteria, ldapUserInfoMapper);
return ldapTemplate.search(ldapQueryCriteria().and(criteria), ldapUserInfoMapper);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment