Commit cf1fa06a by 陈健智

公告列表增加排序

parent b3ece850
......@@ -81,6 +81,7 @@ public class NoticeInfoServiceImpl implements NoticeInfoService {
if (StringUtils.isNotBlank(keyword)) {
noticeInfoDao.addKeywordFuzz(query, keyword, "title");
}
query.with(Sort.by(Sort.Direction.DESC, "cTime"));
long total = noticeInfoDao.count(query);
mongoUtil.start(page, size, query);
List<NoticeInfo> noticeInfoList = noticeInfoDao.findList(query);
......@@ -112,6 +113,7 @@ public class NoticeInfoServiceImpl implements NoticeInfoService {
Query query = new Query();
query.addCriteria(Criteria.where("start").is(true));
query.addCriteria(Criteria.where("show").is(true));
query.with(Sort.by(Sort.Direction.DESC, "cTime"));
long total = noticeInfoDao.count(query);
mongoUtil.start(page, size, query);
List<NoticeInfo> noticeInfoList = noticeInfoDao.findList(query);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment