Merge branch 'master' into docker_package

This commit is contained in:
wangliwen 2022-08-15 16:03:32 +08:00
commit 37251fa0d8
1 changed files with 12 additions and 2 deletions

View File

@ -520,7 +520,12 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
}, Comparator.reverseOrder())
.thenComparing(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 -> {
ResourceDTO index = (ResourceDTO) x;
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();
}, Comparator.reverseOrder()).thenComparing(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 -> {
ResourceDTO index = (ResourceDTO) x;