Merge branch 'master' into docker_package
# Conflicts: # renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java
This commit is contained in:
commit
0e18c338e8
|
@ -513,6 +513,10 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
resourceDTOS = resourceDao.selectDTOPage(resourceDTO, null, null, null, null, ids);
|
||||
if ("DESC".equals(orderType)) {
|
||||
resultPage.setRecords(resourceDTOS.stream().sorted(Comparator.comparing(x -> {
|
||||
ResourceDTO index = (ResourceDTO) x;
|
||||
return index.getTotal() == null ? 0L : index.getTotal();
|
||||
}).reversed()
|
||||
.thenComparing(x -> {
|
||||
ResourceDTO index = (ResourceDTO) x;
|
||||
int pinTop = index.getPinTop() == null ? 0 : index.getPinTop();
|
||||
if (pinTop > 0) {
|
||||
|
@ -521,10 +525,6 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
return new Date(0).getTime() + pinTop;
|
||||
}
|
||||
}).reversed()
|
||||
.thenComparing(x -> {
|
||||
ResourceDTO index = (ResourceDTO) x;
|
||||
return index.getTotal() == null ? 0L : index.getTotal();
|
||||
}, Comparator.reverseOrder())
|
||||
).collect(Collectors.toList()));
|
||||
} else {
|
||||
resultPage.setRecords(resourceDTOS.stream().sorted(Comparator.comparing(x -> {
|
||||
|
|
Loading…
Reference in New Issue