This commit is contained in:
parent
bda6596caa
commit
a26819491d
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue