This commit is contained in:
wangliwen 2022-08-15 16:03:20 +08:00
parent bda6596caa
commit a26819491d
1 changed files with 12 additions and 2 deletions

View File

@ -520,7 +520,12 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
}, Comparator.reverseOrder()) }, Comparator.reverseOrder())
.thenComparing(x -> { .thenComparing(x -> {
ResourceDTO index = (ResourceDTO) x; ResourceDTO index = (ResourceDTO) x;
return index.getPinTopTime() == null ? new Date(0) : index.getPinTopTime(); int pinTop = index.getPinTop() == null ? 0 : index.getPinTop();
if (pinTop > 0) {
return index.getPinTopTime() == null ? new Date(0).getTime() : index.getPinTopTime().getTime();
} else {
return new Date(0).getTime();
}
}, Comparator.reverseOrder()).thenComparing(x -> { }, Comparator.reverseOrder()).thenComparing(x -> {
ResourceDTO index = (ResourceDTO) x; ResourceDTO index = (ResourceDTO) x;
return index.getTotal() == null ? 0L : index.getTotal(); return index.getTotal() == null ? 0L : index.getTotal();
@ -532,7 +537,12 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
return index.getPinTop() == null ? 0 : index.getPinTop(); return index.getPinTop() == null ? 0 : index.getPinTop();
}, Comparator.reverseOrder()).thenComparing(x -> { }, Comparator.reverseOrder()).thenComparing(x -> {
ResourceDTO index = (ResourceDTO) x; ResourceDTO index = (ResourceDTO) x;
return index.getPinTopTime() == null ? new Date(0) : index.getPinTopTime(); int pinTop = index.getPinTop() == null ? 0 : index.getPinTop();
if (pinTop > 0) {
return index.getPinTopTime() == null ? new Date(0).getTime() : index.getPinTopTime().getTime();
} else {
return new Date(0).getTime();
}
}, Comparator.reverseOrder()) }, Comparator.reverseOrder())
.thenComparing(x -> { .thenComparing(x -> {
ResourceDTO index = (ResourceDTO) x; ResourceDTO index = (ResourceDTO) x;