From a75dc249c98b90da04ecff5c107e6fcb916dd67a Mon Sep 17 00:00:00 2001 From: wangliwen Date: Mon, 15 Aug 2022 17:47:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resource/service/impl/ResourceServiceImpl.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java index e59f84f6..f9fffcc7 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/impl/ResourceServiceImpl.java @@ -472,11 +472,6 @@ public class ResourceServiceImpl extends CrudServiceImpl { List temp = selectDTOPageSpecilTotal.parallelStream().map(Map.class::cast) .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; int pingTOp_ = (index.get("pin_top") == null) ? 0 : Integer.parseInt(index.get("pin_top").toString()); if (pingTOp_ <= 0) { @@ -484,6 +479,11 @@ public class ResourceServiceImpl extends CrudServiceImpl { + Map index = (Map) x; + String string = (index.get("total") == null) ? "0" : index.get("total").toString(); + return Long.valueOf(string); }, Comparator.reverseOrder()) ).skip((long) (pageNum - 1) * pageSize).limit(pageSize).map(x -> Long.valueOf(x.get("id").toString())).limit(pageSize).collect(Collectors.toList()); return temp;