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; } 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); 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>