huanghongfa
2021-04-21 970ed0f8df6a19e4e3dae062c4e2e2232a0b97d0
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngProvinceServiceImpl.java
@@ -1,5 +1,6 @@
package com.panzhihua.service_community.service.impl;
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;
@@ -36,7 +37,7 @@
    @Override
    public R getProvince() {
        List<ComMngProvinceDO> provinceDOS = comMngProvinceDAO.selectList(null);
        List<ComMngProvinceDO> provinceDOS = comMngProvinceDAO.selectList(new LambdaQueryWrapper<>());
        List<ComMngProvinceVO> vos = new ArrayList<>();
        provinceDOS.forEach(p -> {
            ComMngProvinceVO vo = new ComMngProvinceVO();
@@ -74,13 +75,13 @@
    @Override
    public R getCityTreeByProvinceCode(Integer provinceAdcode) {
        List<ComMngProvinceDO> provinceDOS = comMngProvinceDAO.selectList(new QueryWrapper<ComMngProvinceDO>().lambda().eq(ComMngProvinceDO::getProvinceAdcode, provinceAdcode));
        List<ComMngCityDO> cityDOS = comMngCityDAO.selectList(null);
        List<ComMngDistrictDO> districtDOS = comMngDistrictDAO.selectList(null);
        List<ComMngCityDO> cityDOS = comMngCityDAO.selectList(new QueryWrapper<>());
        List<ComMngDistrictDO> districtDOS = comMngDistrictDAO.selectList(new QueryWrapper<>());
        List<ComMngAreaVO> vos = new ArrayList<>();
        provinceDOS.forEach(p -> {
            ComMngAreaVO pvo = new ComMngAreaVO(p.getProvinceAdcode(), p.getProvinceName());
            vos.add(pvo);
            List<ComMngCityDO> citys = cityDOS.stream().filter(city -> city.getProvinceAdcode().equals(p.getProvinceAdcode())).collect(Collectors.toList());
            List<ComMngCityDO> citys = cityDOS.stream().filter(city -> city.getProvinceAdcode().equals(p.getProvinceAdcode()) && city.getCityAdcode().equals(510400)).collect(Collectors.toList());
            citys.forEach(c -> {
                ComMngAreaVO cityVo = new ComMngAreaVO(c.getCityAdcode(), c.getCityName());
                BeanUtils.copyProperties(c, cityVo);