From 12fc808332a67c59a4e1c849c8c2b20df6801f18 Mon Sep 17 00:00:00 2001 From: yanghui <2536613402@qq.com> Date: 星期五, 21 十月 2022 17:10:35 +0800 Subject: [PATCH] Merge branch 'local_20221014' into huacheng_test --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java | 25 ++++++++++++++----------- 1 files changed, 14 insertions(+), 11 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 13ce2eb..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 @@ -102,12 +102,14 @@ // } // } Long communityId = neighborCircleAppDTO.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); + } + neighborCircleAppDTO.setCommunityIds(communityIds); } - neighborCircleAppDTO.setCommunityIds(communityIds); Page userPage = new Page(neighborCircleAppDTO.getPageNum(), neighborCircleAppDTO.getPageSize()); IPage<ComActNeighborCircleAppVO> doPager = this.baseMapper.pageNeighborByApp(userPage, neighborCircleAppDTO); if (!doPager.getRecords().isEmpty()) { @@ -343,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