修改排序
This commit is contained in:
@ -131,7 +131,7 @@ public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventSt
|
|||||||
if (ObjectUtil.isNotNull(inVO.getEndTime())) {
|
if (ObjectUtil.isNotNull(inVO.getEndTime())) {
|
||||||
queryStyle.lt(EventStyle::getSendTime, inVO.getEndTime());
|
queryStyle.lt(EventStyle::getSendTime, inVO.getEndTime());
|
||||||
}
|
}
|
||||||
|
queryStyle.orderByDesc(EventStyle::getCreateTime);
|
||||||
Page<EventStyle> page = new Page<>(inVO.getPageNo(), inVO.getPageSize());
|
Page<EventStyle> page = new Page<>(inVO.getPageNo(), inVO.getPageSize());
|
||||||
|
|
||||||
Page<EventStyle> stylePage = this.page(page, queryStyle);
|
Page<EventStyle> stylePage = this.page(page, queryStyle);
|
||||||
@ -154,13 +154,12 @@ public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventSt
|
|||||||
.sendTime(s.getSendTime())
|
.sendTime(s.getSendTime())
|
||||||
.build()));
|
.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<EventMaintainOutVO> iPage = new Page<>();
|
||||||
iPage.setTotal(stylePage.getTotal());
|
iPage.setTotal(stylePage.getTotal());
|
||||||
iPage.setPages(stylePage.getPages());
|
iPage.setPages(stylePage.getPages());
|
||||||
iPage.setCurrent(stylePage.getCurrent());
|
iPage.setCurrent(stylePage.getCurrent());
|
||||||
iPage.setSize(stylePage.getSize());
|
iPage.setSize(stylePage.getSize());
|
||||||
iPage.setRecords(collect);
|
iPage.setRecords(outVOList);
|
||||||
return iPage;
|
return iPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user