|
|
|
@ -78,7 +78,9 @@ public class CMSJournalService {
|
|
|
|
|
Specification<Journal> journalSpecification = buildSearchSpecification(param, journalIdsByTags);
|
|
|
|
|
journalPage = journalDao.findAll(journalSpecification, pageRequest);
|
|
|
|
|
} else {
|
|
|
|
|
journalPage = journalDao.findAll(pageRequest);
|
|
|
|
|
List<String> journalIdsByTags = null;
|
|
|
|
|
Specification<Journal> journalSpecification = buildSearchSpecification(param, journalIdsByTags);
|
|
|
|
|
journalPage = journalDao.findAll(journalSpecification,pageRequest);
|
|
|
|
|
}
|
|
|
|
|
long totalElements = journalPage.getTotalElements();
|
|
|
|
|
List<Journal> 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()]));
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|