修改排序

This commit is contained in:
517612449@qq.com
2022-07-15 09:59:38 +08:00
parent 8743da85fb
commit 807d280762

View File

@ -131,7 +131,7 @@ public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventSt
if (ObjectUtil.isNotNull(inVO.getEndTime())) {
queryStyle.lt(EventStyle::getSendTime, inVO.getEndTime());
}
queryStyle.orderByDesc(EventStyle::getCreateTime);
Page<EventStyle> page = new Page<>(inVO.getPageNo(), inVO.getPageSize());
Page<EventStyle> stylePage = this.page(page, queryStyle);
@ -154,13 +154,12 @@ public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventSt
.sendTime(s.getSendTime())
.build()));
}
List<EventMaintainOutVO> collect = outVOList.stream().sorted(Comparator.comparing(EventMaintainOutVO::getCreateTime, Comparator.nullsLast(LocalDateTime::compareTo)).reversed()).collect(Collectors.toList());
IPage<EventMaintainOutVO> iPage = new Page<>();
iPage.setTotal(stylePage.getTotal());
iPage.setPages(stylePage.getPages());
iPage.setCurrent(stylePage.getCurrent());
iPage.setSize(stylePage.getSize());
iPage.setRecords(collect);
iPage.setRecords(outVOList);
return iPage;
}