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 c9747b9..44d1dfd 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 @@ -78,7 +78,9 @@ public class CMSJournalService { Specification journalSpecification = buildSearchSpecification(param, journalIdsByTags); journalPage = journalDao.findAll(journalSpecification, pageRequest); } else { - journalPage = journalDao.findAll(pageRequest); + List journalIdsByTags = null; + Specification journalSpecification = buildSearchSpecification(param, journalIdsByTags); + journalPage = journalDao.findAll(journalSpecification,pageRequest); } long totalElements = journalPage.getTotalElements(); List content = journalPage.getContent(); @@ -145,6 +147,7 @@ public class CMSJournalService { Predicate title = builder.like(root.get("title"), likeExpression); predicateList.add(builder.or(journalNo, title)); } + query.orderBy(builder.desc(root.get("journalNo").as(Integer.class))); return builder.and(predicateList.toArray(new Predicate[predicateList.size()])); }; } diff --git a/luoo_tag/src/main/java/com/luoo/tag/service/TagService.java b/luoo_tag/src/main/java/com/luoo/tag/service/TagService.java index c377df9..0ecee82 100644 --- a/luoo_tag/src/main/java/com/luoo/tag/service/TagService.java +++ b/luoo_tag/src/main/java/com/luoo/tag/service/TagService.java @@ -217,8 +217,8 @@ public class TagService { if(resultCode == 0){ return userInfoResult.getData(); }*/ - UserInfo foo = UserInfo.builder().id("1627863701048659968").name("foo").build(); - UserInfo other = UserInfo.builder().id("1627863701048659969").name("老左").build(); + UserInfo foo = UserInfo.builder().id("1627863701048659968").name("落在低处").build(); + UserInfo other = UserInfo.builder().id("1627863701048659969").name("左岸以西").build(); return Lists.newArrayList(foo, other); }