Merge branch 'master' into docker_package

This commit is contained in:
wangliwen 2022-07-07 19:56:28 +08:00
commit 9be7dd5f28
1 changed files with 11 additions and 4 deletions

View File

@ -400,10 +400,17 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
break;
}
resourceDTOS = resourceDao.selectDTOPage(resourceDTO, null, null, null, null, ids);
resultPage.setRecords(resourceDTOS.stream().sorted(Comparator.comparing(x -> {
ResourceDTO index = (ResourceDTO) x;
return index.getTotal() == null ? 0L : index.getTotal();
}).reversed()).collect(Collectors.toList()));
if ("DESC".equals(orderType)) {
resultPage.setRecords(resourceDTOS.stream().sorted(Comparator.comparing(x -> {
ResourceDTO index = (ResourceDTO) x;
return index.getTotal() == null ? 0L : index.getTotal();
}).reversed()).collect(Collectors.toList()));
} else {
resultPage.setRecords(resourceDTOS.stream().sorted(Comparator.comparing(x -> {
ResourceDTO index = (ResourceDTO) x;
return index.getTotal() == null ? 0L : index.getTotal();
})).collect(Collectors.toList()));
}
} else {
resourceDTOS = resourceDao.selectDTOPage(resourceDTO, (pageNum - 1) * pageSize, pageSize, orderField, orderType, null);
}