| | |
| | | ); |
| | | if (tmsRegion != null){ |
| | | hasMap.put("provinceCode",tmsRegion.getRegionCode()); |
| | | } |
| | | } |
| | | if (StringUtils.isNotEmpty(addressVo.getCity())){ |
| | | TmsRegion tmsRegion = tmsRegionService.getBaseMapper().selectOne(new LambdaUpdateWrapper<>(TmsRegion.class) |
| | | .eq(TmsRegion::getRegionName, addressVo.getCity()) |
| | | .last("limit 1") |
| | | ); |
| | | if (tmsRegion != null){ |
| | | hasMap.put("cityCode",tmsRegion.getRegionCode()); |
| | | } |
| | | } |
| | | if (StringUtils.isNotEmpty(addressVo.getDistrict())){ |
| | | TmsRegion tmsRegion = tmsRegionService.getBaseMapper().selectOne(new LambdaUpdateWrapper<>(TmsRegion.class) |
| | | .eq(TmsRegion::getRegionName, addressVo.getDistrict()) |
| | | .last("limit 1") |
| | | ); |
| | | if (tmsRegion != null){ |
| | | hasMap.put("districtCode",tmsRegion.getRegionCode()); |
| | | } |
| | | } |
| | | if (StringUtils.isNotEmpty(addressVo.getTownship())){ |
| | | TmsRegion tmsRegion = tmsRegionService.getBaseMapper().selectOne(new LambdaUpdateWrapper<>(TmsRegion.class) |
| | | .eq(TmsRegion::getRegionName, addressVo.getTownship()) |
| | | .last("limit 1") |
| | | ); |
| | | if (tmsRegion != null){ |
| | | hasMap.put("townshipCode",tmsRegion.getRegionCode()); |
| | | if (StringUtils.isNotEmpty(addressVo.getCity())){ |
| | | TmsRegion tmsRegion2 = tmsRegionService.getBaseMapper().selectOne(new LambdaUpdateWrapper<>(TmsRegion.class) |
| | | .eq(TmsRegion::getRegionName, addressVo.getCity()) |
| | | .eq(TmsRegion::getParentRegionCode, tmsRegion.getRegionCode()) |
| | | .last("limit 1") |
| | | ); |
| | | if (tmsRegion2 != null){ |
| | | hasMap.put("cityCode",tmsRegion2.getRegionCode()); |
| | | |
| | | if (StringUtils.isNotEmpty(addressVo.getDistrict())){ |
| | | TmsRegion tmsRegion3= tmsRegionService.getBaseMapper().selectOne(new LambdaUpdateWrapper<>(TmsRegion.class) |
| | | .eq(TmsRegion::getRegionName, addressVo.getDistrict()) |
| | | .eq(TmsRegion::getParentRegionCode, tmsRegion2.getRegionCode()) |
| | | .last("limit 1") |
| | | ); |
| | | if (tmsRegion3 != null){ |
| | | hasMap.put("districtCode",tmsRegion3.getRegionCode()); |
| | | |
| | | if (StringUtils.isNotEmpty(addressVo.getTownship())){ |
| | | TmsRegion tmsRegion4 = tmsRegionService.getBaseMapper().selectOne(new LambdaUpdateWrapper<>(TmsRegion.class) |
| | | .eq(TmsRegion::getRegionName, addressVo.getTownship()) |
| | | .eq(TmsRegion::getParentRegionCode, tmsRegion3.getRegionCode()) |
| | | .last("limit 1") |
| | | ); |
| | | if (tmsRegion4 != null){ |
| | | hasMap.put("townshipCode",tmsRegion4.getRegionCode()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return AjaxResult.success(hasMap); |