....
This commit is contained in:
parent
9565b4fe82
commit
bda6596caa
|
@ -470,7 +470,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
switch (orderType.toUpperCase()) {
|
||||
case "DESC": // total 倒序
|
||||
ids = customThreadPool.submit(() -> {
|
||||
List<Long> temp = selectDTOPageSpecilTotal.parallelStream().map(Map.class::cast).sorted(Comparator.comparing(x -> {
|
||||
List<Long> temp = selectDTOPageSpecilTotal.parallelStream().map(Map.class::cast)
|
||||
.sorted(Comparator.comparing(x -> {
|
||||
Map index = (Map) x;
|
||||
int pingTOp = (index.get("pin_top") == null) ? 0 : Integer.parseInt(index.get("pin_top").toString());
|
||||
return pingTOp;
|
||||
|
@ -479,7 +480,8 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
Map index = (Map) x;
|
||||
long pingTOp = (index.get("pin_top_time") == null) ? 0 : Long.parseLong(index.get("pin_top_time").toString());
|
||||
return pingTOp;
|
||||
}, Comparator.reverseOrder()).thenComparing(x -> {
|
||||
}, Comparator.reverseOrder())
|
||||
.thenComparing(x -> {
|
||||
Map index = (Map) x;
|
||||
String string = (index.get("total") == null) ? "0" : index.get("total").toString();
|
||||
return Long.valueOf(string);
|
||||
|
@ -490,15 +492,18 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
break;
|
||||
case "ASC": // total 升序
|
||||
ids = customThreadPool.submit(() -> {
|
||||
List<Long> temp = selectDTOPageSpecilTotal.parallelStream().map(Map.class::cast).sorted(Comparator.comparing(x -> {
|
||||
List<Long> temp = selectDTOPageSpecilTotal.parallelStream().map(Map.class::cast)
|
||||
.sorted(Comparator.comparing(x -> {
|
||||
Map index = (Map) x;
|
||||
int pingTOp = (index.get("pin_top") == null) ? 0 : Integer.parseInt(index.get("pin_top").toString());
|
||||
return pingTOp;
|
||||
}, Comparator.reverseOrder()).thenComparing(x -> {
|
||||
}, Comparator.reverseOrder())
|
||||
.thenComparing(x -> {
|
||||
Map index = (Map) x;
|
||||
long pingTOp = (index.get("pin_top_time") == null) ? 0 : Long.parseLong(index.get("pin_top_time").toString());
|
||||
return pingTOp;
|
||||
}, Comparator.reverseOrder()).thenComparing(x -> {
|
||||
}, Comparator.reverseOrder())
|
||||
.thenComparing(x -> {
|
||||
Map index = (Map) x;
|
||||
String string = (index.get("total") == null) ? "0" : index.get("total").toString();
|
||||
return Long.valueOf(string);
|
||||
|
|
Loading…
Reference in New Issue