| | |
| | | package com.pollex.pam.service; |
| | | |
| | | import com.pollex.pam.domain.Consultant; |
| | | import com.pollex.pam.enums.ConsultantStatusEnum; |
| | | import com.pollex.pam.service.dto.FastQueryConsultantParam; |
| | | import com.pollex.pam.service.dto.StrictQueryConsultantParam; |
| | | import org.apache.commons.lang3.StringUtils; |
| | |
| | | @Override |
| | | public Predicate toPredicate(Root<Consultant> root, CriteriaQuery<?> query, CriteriaBuilder criteriaBuilder) { |
| | | Set<Predicate> set = new HashSet<>(); |
| | | |
| | | set.add(criteriaBuilder.equal(root.get("status"), ConsultantStatusEnum.AVAILABLE)); |
| | | |
| | | param.getCommunicationStyles().forEach((communicationStyle) -> { |
| | | set.add(criteriaBuilder.like(root.get("communicationStyle"), "%" + communicationStyle + "%")); |
| | |
| | | public Predicate toPredicate(Root<Consultant> root, CriteriaQuery<?> query, CriteriaBuilder criteriaBuilder) { |
| | | Set<Predicate> set = new HashSet<>(); |
| | | |
| | | set.add(criteriaBuilder.equal(root.get("status"), ConsultantStatusEnum.AVAILABLE)); |
| | | |
| | | if(Objects.nonNull(param.getGender())) { |
| | | set.add(criteriaBuilder.equal(root.get("gender"), param.getGender())); |
| | | } |