| | |
| | | // 1. 基础数据查询 |
| | | Map<String, String> geocode = gdMapGeocodingUtil.geocode(routeAndFareDto.getOrigin().getLongitude().toString(), routeAndFareDto.getOrigin().getLatitude().toString()); |
| | | if(null == geocode){ |
| | | throw new ServiceException("获取城市信息失败", I18nKeyConstant.CITY_NOT_FOUND); |
| | | throw new ServiceException("城市暂未开通服务", I18nKeyConstant.CITY_NOT_FOUND); |
| | | } |
| | | Long cityCode = routeAndFareDto.getOpenCityId(); |
| | | XpOpenCity openCities = xpOpenCityMapper.selectById(cityCode); |
| | | if (openCities == null ) { |
| | | throw new ServiceException("获取城市信息失败", I18nKeyConstant.CITY_NOT_FOUND); |
| | | throw new ServiceException("城市暂未开通服务", I18nKeyConstant.CITY_NOT_FOUND); |
| | | } |
| | | XpOpenCity xpOpenCity = openCities; |
| | | routeAndFareDto.setOpenCityId(xpOpenCity.getId()); |
| | |
| | | |
| | | XpOpenCity openCities = xpOpenCityMapper.selectById(dto.getOpenCityId()); |
| | | if (openCities == null) { |
| | | throw new ServiceException("获取城市信息失败", I18nKeyConstant.CITY_NOT_FOUND); |
| | | throw new ServiceException("城市暂未开通服务", I18nKeyConstant.CITY_NOT_FOUND); |
| | | } |
| | | XpOpenCity xpOpenCity = openCities; |
| | | dto.setOpenCityId(xpOpenCity.getId()); |