。。。

This commit is contained in:
wangliwen 2022-07-19 16:47:13 +08:00
parent 0cd5c87689
commit 58ba499f79
1 changed files with 7 additions and 1 deletions

View File

@ -192,7 +192,13 @@ public class ActTaskService extends BaseServiceImpl {
page.setTotal(0);
} else {
ArrayList<TaskDTO> recordLists = new ArrayList<>();
recordLists.addAll(taskDtoList.stream().distinct().skip((curPage - 1) * limit).limit(limit).collect(Collectors.toList()));
recordLists.addAll(taskDtoList.stream()
.sorted(Comparator.comparing(TaskDTO::getCreateTime).reversed())
.distinct()
.skip((curPage - 1) * limit)
.limit(limit)
.collect(Collectors.toList())
);
page.setRecords(recordLists);
page.setTotal(count.stream().mapToLong(index -> index.longValue()).sum());
}