修改排序

This commit is contained in:
517612449@qq.com
2022-07-14 16:16:39 +08:00
parent a9593a9493
commit 8743da85fb

View File

@ -53,9 +53,9 @@ public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventSt
query.orderByDesc(EventStyle::getCreateTime);
List<EventStyle> list;
if ("banner".equals(type)) {
query.eq(EventStyle::getBanner, "1").eq(EventStyle::getStatus, "1").orderByAsc(EventStyle::getSort);
query.eq(EventStyle::getCategory, "1").eq(EventStyle::getStatus, "1").orderByAsc(EventStyle::getSort);
} else {
query.eq(EventStyle::getBanner, "0").eq(EventStyle::getStatus, "1").orderByAsc(EventStyle::getSort);
query.eq(EventStyle::getCategory, "2").eq(EventStyle::getStatus, "1").orderByAsc(EventStyle::getSort);
}
query.ne(EventStyle::getDeleteFlag, "1");
list = this.list(query);
@ -154,7 +154,7 @@ public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventSt
.sendTime(s.getSendTime())
.build()));
}
List<EventMaintainOutVO> collect = outVOList.stream().sorted(Comparator.comparing(EventMaintainOutVO::getSendTime, Comparator.nullsLast(LocalDateTime::compareTo)).reversed()).collect(Collectors.toList());
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());