From 353af3243fc246c47d4ad8e076bfca1e99d2e89d Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期四, 30 六月 2022 15:37:15 +0800 Subject: [PATCH] 防疫报备更新 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/BcRegionMapper.xml | 8 ++++---- springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ProvinceCityReturnVO.java | 1 + springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BcRegionServiceImpl.java | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ProvinceCityReturnVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ProvinceCityReturnVO.java index 13e4211..7ad45e0 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ProvinceCityReturnVO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ProvinceCityReturnVO.java @@ -10,5 +10,6 @@ @Data public class ProvinceCityReturnVO { private String name; + private String code; private List<ProvinceCityReturnVO> provinceCityReturnVOList; } diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BcRegionServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BcRegionServiceImpl.java index 866d8af..55d77a1 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BcRegionServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BcRegionServiceImpl.java @@ -42,11 +42,11 @@ else { List<ProvinceCityReturnVO> firstLevel=this.baseMapper.selectFirst(); firstLevel.forEach(provinceCityReturnVO -> { - List<ProvinceCityReturnVO> secondLevel=this.baseMapper.selectSecond(provinceCityReturnVO.getName()); + List<ProvinceCityReturnVO> secondLevel=this.baseMapper.selectSecond(provinceCityReturnVO.getCode()); secondLevel.forEach(provinceCityReturnVO1 -> { - List<ProvinceCityReturnVO> thirdLevel=this.baseMapper.selectThird(provinceCityReturnVO1.getName()); + List<ProvinceCityReturnVO> thirdLevel=this.baseMapper.selectThird(provinceCityReturnVO1.getCode()); thirdLevel.forEach(provinceCityReturnVO2 -> { - List<ProvinceCityReturnVO> fourthLevel=this.baseMapper.selectFourth(provinceCityReturnVO2.getName()); + List<ProvinceCityReturnVO> fourthLevel=this.baseMapper.selectFourth(provinceCityReturnVO2.getCode()); provinceCityReturnVO2.setProvinceCityReturnVOList(fourthLevel); }); provinceCityReturnVO1.setProvinceCityReturnVOList(thirdLevel); diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/BcRegionMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/BcRegionMapper.xml index 80ef026..8e6efec 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/BcRegionMapper.xml +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/BcRegionMapper.xml @@ -36,18 +36,18 @@ </select> <select id="selectFirst" resultType="com.panzhihua.common.model.vos.community.ProvinceCityReturnVO"> - select distinct province as name from area_index_2022 + select distinct name,code from area_code_2022 where level=1 </select> <select id="selectSecond" resultType="com.panzhihua.common.model.vos.community.ProvinceCityReturnVO"> - select distinct city as name from area_index_2022 where province = #{name} and city !='攀枝花市' + select distinct name,code from area_code_2022 where level=2 and pcode=#{name} and name !='攀枝花市' </select> <select id="selectThird" resultType="com.panzhihua.common.model.vos.community.ProvinceCityReturnVO"> - select distinct county as name from area_index_2022 where city = #{name} + select distinct name,code from area_code_2022 where level=3 and pcode=#{name} </select> <select id="selectFourth" resultType="com.panzhihua.common.model.vos.community.ProvinceCityReturnVO"> - select distinct town as name from area_index_2022 where county = #{name} + select distinct name,code from area_code_2022 where level=4 and pcode=#{name} </select> </mapper> -- Gitblit v1.7.1