From 2c2da3f1b6720b3b0cc84b4ad258425827e5db69 Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期二, 27 六月 2023 16:53:18 +0800 Subject: [PATCH] 新增三资公开区域筛选接口添加社区信息 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngProvinceServiceImpl.java | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngProvinceServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngProvinceServiceImpl.java index 25b90f0..71f3aba 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngProvinceServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngProvinceServiceImpl.java @@ -1,6 +1,7 @@ package com.panzhihua.service_community.service.impl; import java.util.ArrayList; +import java.util.Comparator; import java.util.List; import java.util.stream.Collectors; @@ -8,6 +9,8 @@ import com.google.common.collect.Lists; import com.panzhihua.common.model.vos.community.*; +import com.panzhihua.common.model.vos.community.switchs.CommunitySwitchAllAppletsVO; +import com.panzhihua.common.model.vos.community.switchs.StreetAllAppletsVO; import com.panzhihua.service_community.dao.*; import com.panzhihua.service_community.model.dos.ComStreetDO; import org.springframework.beans.BeanUtils; @@ -35,6 +38,10 @@ @Resource private ComStreetDAO comStreetDAO; + + + @Resource + private ComActDAO comActDAO; @Override public R getProvince() { @@ -142,6 +149,16 @@ ComMngAreaVO csd = new ComMngAreaVO(0, dos.getName(),dos.getStreetId()+""); BeanUtils.copyProperties(dos, csd); districtVo.getChildren().add(csd); + + // 查询街道下社区列表 + List<CommunitySwitchAllAppletsVO> communityList = comActDAO.getCommunityListByStreetId(dos.getStreetId()); + + communityList.forEach(csaa ->{ + ComMngAreaVO cssd = new ComMngAreaVO(0, csaa.getName(),csaa.getCommunityId()+""); + BeanUtils.copyProperties(csaa, cssd); + csd.getChildren().add(cssd); + + }); }); -- Gitblit v1.7.1