From 391b64ce62f567c1da66445663c41cdd29b39268 Mon Sep 17 00:00:00 2001 From: yanghui <2536613402@qq.com> Date: 星期四, 01 十二月 2022 09:13:45 +0800 Subject: [PATCH] #feat .. --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java | 28 ++++++++++++++++++++++------ 1 files changed, 22 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..c7b961e 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 -> { @@ -354,6 +364,12 @@ }); return R.ok(doPager); } + @Override + public R pageNeighborByBigScreen(ComActNeighborCircleAdminDTO neighborCircleAdminDTO) { + Page page = new Page(neighborCircleAdminDTO.getPageNum(), neighborCircleAdminDTO.getPageSize()); + IPage<ComActNeighborCircleAdminVO> doPager = this.baseMapper.pageNeighborByBigScreen(page, neighborCircleAdminDTO); + return R.ok(doPager); + } @Override public R addNeighborByAdmin(AddNeighborCircleAdminVO addVO) { -- Gitblit v1.7.1