From c40be027ef8068b9a77bb24c94291dee25f563d8 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期四, 19 八月 2021 09:28:38 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/test' into test

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
index 400eea7..68ddeaf 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActServiceImpl.java
@@ -25,7 +25,10 @@
 
 import javax.annotation.Resource;
 import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * @program: springcloud_k8s_panzhihuazhihuishequ
@@ -220,8 +223,10 @@
             List<CommunitySwitchAllAppletsVO> communityList = this.comActDAO.getCommunityListByStreetId(street.getStreetId());
             if(!communityList.isEmpty()){
                 street.setChildList(communityList);
+                street.setCount(communityList.size());
             }
         });
+        streetList = streetList.stream().sorted(Comparator.comparing(StreetAllAppletsVO::getCount).reversed()).collect(Collectors.toList());
         return R.ok(streetList);
     }
 

--
Gitblit v1.7.1