From a5065edde51c1ed77153cf043e2eeb014926225c Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期二, 27 六月 2023 16:37:50 +0800 Subject: [PATCH] 新增三资公开区域筛选接口添加街道信息 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngProvinceServiceImpl.java | 31 +++++++++++++++++++++---------- 1 files changed, 21 insertions(+), 10 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 f11a9bd..25b90f0 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 @@ -6,20 +6,16 @@ import javax.annotation.Resource; +import com.google.common.collect.Lists; +import com.panzhihua.common.model.vos.community.*; +import com.panzhihua.service_community.dao.*; +import com.panzhihua.service_community.model.dos.ComStreetDO; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.panzhihua.common.model.vos.R; -import com.panzhihua.common.model.vos.community.ComMngAreaVO; -import com.panzhihua.common.model.vos.community.ComMngCityVO; -import com.panzhihua.common.model.vos.community.ComMngDistrictVO; -import com.panzhihua.common.model.vos.community.ComMngProvinceVO; -import com.panzhihua.service_community.dao.ComMngCityDAO; -import com.panzhihua.service_community.dao.ComMngDistrictDAO; -import com.panzhihua.service_community.dao.ComMngProvinceDAO; -import com.panzhihua.service_community.dao.ComMngStructAreaDAO; import com.panzhihua.service_community.model.dos.ComMngCityDO; import com.panzhihua.service_community.model.dos.ComMngDistrictDO; import com.panzhihua.service_community.model.dos.ComMngProvinceDO; @@ -38,7 +34,7 @@ private ComMngDistrictDAO comMngDistrictDAO; @Resource - private ComMngStructAreaDAO comMngStructAreaDAO; + private ComStreetDAO comStreetDAO; @Override public R getProvince() { @@ -133,9 +129,24 @@ BeanUtils.copyProperties(d, districtVo); cityVo.getChildren().add(districtVo); vos.add(districtVo); + + LambdaQueryWrapper<ComStreetDO> param = new QueryWrapper<ComStreetDO>().lambda(); + ComStreetVO comStreetVO=new ComStreetVO(); + comStreetVO.setAreaCode(d.getDistrictAdcode()); + if (comStreetVO.getAreaCode() != null) { + param.eq(ComStreetDO::getAreaCode, comStreetVO.getAreaCode()); + } + List<ComStreetDO> comStreetDOS = comStreetDAO.selectList(param); + comStreetDOS.forEach(dos -> + { + ComMngAreaVO csd = new ComMngAreaVO(0, dos.getName(),dos.getStreetId()+""); + BeanUtils.copyProperties(dos, csd); + districtVo.getChildren().add(csd); + }); + + }); }); -// vos.add(pvo); }); return R.ok(vos); } -- Gitblit v1.7.1