diff --git a/luoo_music/src/main/java/com/luoo/music/service/CMSJournalService.java b/luoo_music/src/main/java/com/luoo/music/service/CMSJournalService.java index 30719c3..c5681ef 100644 --- a/luoo_music/src/main/java/com/luoo/music/service/CMSJournalService.java +++ b/luoo_music/src/main/java/com/luoo/music/service/CMSJournalService.java @@ -104,8 +104,11 @@ public class CMSJournalService { private Specification buildSearchSpecification(JournalQueryModel param, List ids) { return (Root root, CriteriaQuery query, CriteriaBuilder builder) -> { List predicateList = new ArrayList(); - if ("1".equals(param.getTab())) { - predicateList.add(builder.equal(root.get("isPublish"), "1")); + // 新建:0,已发布:1, 回收站:2 + if ("1".equals(param.getTab())) { + Predicate state = builder.equal(root.get("state"), "1"); + Predicate isPublish = builder.equal(root.get("isPublish"), "1"); + predicateList.add(builder.and(state, isPublish)); } else if ("2".equals(param.getTab())) { predicateList.add(builder.equal(root.get("state"), "0")); } else {