| | |
| | | import com.xiaopeng.operation.dto.OpenCityEditDTO; |
| | | import com.xiaopeng.operation.mapper.XpOpenCityMapper; |
| | | import com.xiaopeng.operation.query.OpenCityPageQuery; |
| | | import com.xiaopeng.operation.service.IXpPricingItemService; |
| | | import com.xiaopeng.operation.service.IXpRoutePlanService; |
| | | import com.xiaopeng.operation.service.XpOpenCityService; |
| | | import com.xiaopeng.operation.service.XpPricingService; |
| | |
| | | } |
| | | return xpOpenCity; |
| | | } |
| | | |
| | | @Override |
| | | public XpOpenCity getByCode(String code) { |
| | | if (StringUtils.isBlank(code)) { |
| | | return null; |
| | | } |
| | | // 尝试匹配 districtCode |
| | | XpOpenCity xpOpenCity = this.baseMapper.selectOne(new LambdaQueryWrapper<XpOpenCity>() |
| | | .eq(XpOpenCity::getDistrictCode, code)); |
| | | if (Objects.nonNull(xpOpenCity)) { |
| | | return xpOpenCity; |
| | | } |
| | | |
| | | // 尝试匹配 cityCode |
| | | xpOpenCity = this.baseMapper.selectOne(new LambdaQueryWrapper<XpOpenCity>() |
| | | .eq(XpOpenCity::getCityCode, code)); |
| | | if (Objects.nonNull(xpOpenCity)) { |
| | | return xpOpenCity; |
| | | } |
| | | |
| | | // 尝试匹配 provinceCode |
| | | xpOpenCity = this.baseMapper.selectOne(new LambdaQueryWrapper<XpOpenCity>() |
| | | .eq(XpOpenCity::getProvinceCode, code)); |
| | | |
| | | return xpOpenCity; |
| | | } |
| | | |
| | | } |