Merge branch 'master' into docker_package

This commit is contained in:
wangliwen 2022-08-15 17:05:47 +08:00
commit ec9b9cad87
1 changed files with 11 additions and 11 deletions

View File

@ -472,6 +472,11 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
ids = customThreadPool.submit(() -> { ids = customThreadPool.submit(() -> {
List<Long> temp = selectDTOPageSpecilTotal.parallelStream().map(Map.class::cast) List<Long> temp = selectDTOPageSpecilTotal.parallelStream().map(Map.class::cast)
.sorted(Comparator.comparing(x -> { .sorted(Comparator.comparing(x -> {
Map index = (Map) x;
String string = (index.get("total") == null) ? "0" : index.get("total").toString();
return Long.valueOf(string);
}).reversed()
.thenComparing(x -> {
Map index = (Map) x; Map index = (Map) x;
int pingTOp_ = (index.get("pin_top") == null) ? 0 : Integer.parseInt(index.get("pin_top").toString()); int pingTOp_ = (index.get("pin_top") == null) ? 0 : Integer.parseInt(index.get("pin_top").toString());
if (pingTOp_ <= 0) { if (pingTOp_ <= 0) {
@ -479,11 +484,6 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
} }
long pingTOp = (index.get("pin_top_time") == null) ? 0 : Long.parseLong(index.get("pin_top_time").toString()); long pingTOp = (index.get("pin_top_time") == null) ? 0 : Long.parseLong(index.get("pin_top_time").toString());
return pingTOp; return pingTOp;
}).reversed()
.thenComparing(x -> {
Map index = (Map) x;
String string = (index.get("total") == null) ? "0" : index.get("total").toString();
return Long.valueOf(string);
}, Comparator.reverseOrder()) }, Comparator.reverseOrder())
).skip((long) (pageNum - 1) * pageSize).limit(pageSize).map(x -> Long.valueOf(x.get("id").toString())).limit(pageSize).collect(Collectors.toList()); ).skip((long) (pageNum - 1) * pageSize).limit(pageSize).map(x -> Long.valueOf(x.get("id").toString())).limit(pageSize).collect(Collectors.toList());
return temp; return temp;
@ -493,6 +493,11 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
ids = customThreadPool.submit(() -> { ids = customThreadPool.submit(() -> {
List<Long> temp = selectDTOPageSpecilTotal.parallelStream().map(Map.class::cast) List<Long> temp = selectDTOPageSpecilTotal.parallelStream().map(Map.class::cast)
.sorted(Comparator.comparing(x -> { .sorted(Comparator.comparing(x -> {
Map index = (Map) x;
String string = (index.get("total") == null) ? "0" : index.get("total").toString();
return Long.valueOf(string);
})
.thenComparing(x -> {
Map index = (Map) x; Map index = (Map) x;
int pingTOp_ = (index.get("pin_top") == null) ? 0 : Integer.parseInt(index.get("pin_top").toString()); int pingTOp_ = (index.get("pin_top") == null) ? 0 : Integer.parseInt(index.get("pin_top").toString());
if (pingTOp_ <= 0) { if (pingTOp_ <= 0) {
@ -500,12 +505,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
} }
long pingTOp = (index.get("pin_top_time") == null) ? 0 : Long.parseLong(index.get("pin_top_time").toString()); long pingTOp = (index.get("pin_top_time") == null) ? 0 : Long.parseLong(index.get("pin_top_time").toString());
return pingTOp; return pingTOp;
}).reversed() }).reversed()).skip((pageNum - 1) * pageSize).limit(pageSize).map(x -> Long.valueOf(x.get("id").toString())).limit(pageSize).collect(Collectors.toList());
.thenComparing(x -> {
Map index = (Map) x;
String string = (index.get("total") == null) ? "0" : index.get("total").toString();
return Long.valueOf(string);
})).skip((pageNum - 1) * pageSize).limit(pageSize).map(x -> Long.valueOf(x.get("id").toString())).limit(pageSize).collect(Collectors.toList());
return temp; return temp;
}).get(); }).get();
break; break;