修改排序
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user