1.remove journal no condition in song fuzzy search

main
Gary 9 months ago
parent 25717ffbd9
commit fd00261a7a

@ -162,6 +162,7 @@ public class JournalSongService {
Specification<JournalSong> specification = fuzzySpecification(keyword);
return journalSongDao.findAll(specification,pageRequest).getContent();
}
private Specification<JournalSong> fuzzySpecification(String keyword) {
return new Specification<JournalSong>() {
private static final long serialVersionUID = 1L;
@ -171,7 +172,7 @@ public class JournalSongService {
predicateList.add(criteriaBuilder.like(root.get("name").as(String.class),"%"+keyword+"%"));
predicateList.add(criteriaBuilder.like(root.get("artist").as(String.class),"%"+keyword+"%"));
predicateList.add(criteriaBuilder.like(root.get("album").as(String.class),"%"+keyword+"%"));
predicateList.add(criteriaBuilder.like(root.get("journalNo").as(String.class),"%"+keyword+"%"));
//predicateList.add(criteriaBuilder.like(root.get("journalNo").as(String.class),"%"+keyword+"%"));
query.orderBy(criteriaBuilder.asc(root.get("name")));
return criteriaBuilder.or(predicateList.toArray(new Predicate[predicateList.size()]));
}

Loading…
Cancel
Save