diff --git a/luoo_music/src/main/java/com/luoo/music/service/JournalSongService.java b/luoo_music/src/main/java/com/luoo/music/service/JournalSongService.java index 793670f..e80889b 100644 --- a/luoo_music/src/main/java/com/luoo/music/service/JournalSongService.java +++ b/luoo_music/src/main/java/com/luoo/music/service/JournalSongService.java @@ -162,6 +162,7 @@ public class JournalSongService { Specification specification = fuzzySpecification(keyword); return journalSongDao.findAll(specification,pageRequest).getContent(); } + private Specification fuzzySpecification(String keyword) { return new Specification() { 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()])); }