Merge branch 'master' into docker_package

This commit is contained in:
wangliwen 2022-07-19 16:52:57 +08:00
commit dbd4164e4c
1 changed files with 6 additions and 1 deletions

View File

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