Commit 94e91895 by shentao

Merge branch 'feature' into 'release'

2023/09/19 公告列表增加排序

See merge request !392
parents d4e39c43 cf1fa06a
...@@ -81,6 +81,7 @@ public class NoticeInfoServiceImpl implements NoticeInfoService { ...@@ -81,6 +81,7 @@ public class NoticeInfoServiceImpl implements NoticeInfoService {
if (StringUtils.isNotBlank(keyword)) { if (StringUtils.isNotBlank(keyword)) {
noticeInfoDao.addKeywordFuzz(query, keyword, "title"); noticeInfoDao.addKeywordFuzz(query, keyword, "title");
} }
query.with(Sort.by(Sort.Direction.DESC, "cTime"));
long total = noticeInfoDao.count(query); long total = noticeInfoDao.count(query);
mongoUtil.start(page, size, query); mongoUtil.start(page, size, query);
List<NoticeInfo> noticeInfoList = noticeInfoDao.findList(query); List<NoticeInfo> noticeInfoList = noticeInfoDao.findList(query);
...@@ -112,6 +113,7 @@ public class NoticeInfoServiceImpl implements NoticeInfoService { ...@@ -112,6 +113,7 @@ public class NoticeInfoServiceImpl implements NoticeInfoService {
Query query = new Query(); Query query = new Query();
query.addCriteria(Criteria.where("start").is(true)); query.addCriteria(Criteria.where("start").is(true));
query.addCriteria(Criteria.where("show").is(true)); query.addCriteria(Criteria.where("show").is(true));
query.with(Sort.by(Sort.Direction.DESC, "cTime"));
long total = noticeInfoDao.count(query); long total = noticeInfoDao.count(query);
mongoUtil.start(page, size, query); mongoUtil.start(page, size, query);
List<NoticeInfo> noticeInfoList = noticeInfoDao.findList(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