From 06180fa3c8ee17d731561b88897fa18b9f8cf228 Mon Sep 17 00:00:00 2001
From: yanghui <2536613402@qq.com>
Date: 星期五, 04 十一月 2022 17:53:50 +0800
Subject: [PATCH] Merge branch 'huacheng_test' into local_20221104

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
index 222593c..59c943d 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
@@ -101,6 +101,15 @@
 //                }
 //            }
 //        }
+        Long communityId = neighborCircleAppDTO.getCommunityId();
+        if(null != communityId){
+            List<Long> communityIds = comActDAO.selectIds(communityId);
+            if (CollUtil.isEmpty(communityIds)) {
+                communityIds = new ArrayList<>();
+                communityIds.add(communityId);
+            }
+            neighborCircleAppDTO.setCommunityIds(communityIds);
+        }
         Page userPage = new Page(neighborCircleAppDTO.getPageNum(), neighborCircleAppDTO.getPageSize());
         IPage<ComActNeighborCircleAppVO> doPager = this.baseMapper.pageNeighborByApp(userPage, neighborCircleAppDTO);
         if (!doPager.getRecords().isEmpty()) {
@@ -336,13 +345,14 @@
     @Override
     public R pageNeighborByAdmin(ComActNeighborCircleAdminDTO neighborCircleAdminDTO) {
         Long communityId = neighborCircleAdminDTO.getCommunityId();
-        List<Long> communityIds = comActDAO.selectIds(communityId);
-        if (CollUtil.isEmpty(communityIds)) {
-            communityIds = new ArrayList<>();
-            communityIds.add(communityId);
+        if(null != communityId){
+            List<Long> communityIds = comActDAO.selectIds(communityId);
+            if (CollUtil.isEmpty(communityIds)) {
+                communityIds = new ArrayList<>();
+                communityIds.add(communityId);
+            }
+            neighborCircleAdminDTO.setCommunityIds(communityIds);
         }
-        neighborCircleAdminDTO.setCommunityIds(communityIds);
-
         Page page = new Page(neighborCircleAdminDTO.getPageNum(), neighborCircleAdminDTO.getPageSize());
         IPage<ComActNeighborCircleAdminVO> doPager = this.baseMapper.pageNeighborByAdmin(page, neighborCircleAdminDTO);
         doPager.getRecords().forEach(data -> {

--
Gitblit v1.7.1