修复变更行程导致无法同步至供应商的bug
This commit is contained in:
parent
839a821047
commit
c0b8980791
|
@ -377,22 +377,25 @@ public class OrderQuery {
|
|||
|
||||
List<CityEntity> cityEntities = new ArrayList<>();
|
||||
for (Location location : locationListAfterNotNull) {
|
||||
if (location.getLocationEnName() == null) {
|
||||
//这里的代码来补充地理位置的英文名
|
||||
Integer level = location.getLevel();
|
||||
if (level.equals(LOCATION_TYPE_CITY)) {
|
||||
PrefectureLevelCityInfoEntity cityInfo = prefectureLevelRepository.findByCityId(location.getCityId());
|
||||
location.setLocationEnName(cityInfo.getCityEnName());
|
||||
} else if (level.equals(LOCATION_TYPE_COUNTY) && location.getLocationShortName().contains("D")) {
|
||||
DistrictPOIInfoEntity byCityId = districtInfoRepository.findByCityId(location.getCityId());
|
||||
location.setLocationEnName(byCityId.getDistrictEnName());
|
||||
} else if (level.equals(LOCATION_TYPE_COUNTY)) {
|
||||
CountryLevelInfoEntity byCityId = countryLevelInfoRepository.findByCityId(location.getCityId());
|
||||
location.setLocationEnName(byCityId.getCountyEnName());
|
||||
} else {
|
||||
location.setLocationEnName("unknown");
|
||||
}
|
||||
}
|
||||
// if (location.getLocationEnName() == null) {
|
||||
// //这里的代码来补充地理位置的英文名
|
||||
// Integer level = location.getLevel();
|
||||
// if (level.equals(LOCATION_TYPE_CITY)) {
|
||||
// PrefectureLevelCityInfoEntity cityInfo = prefectureLevelRepository.findByCityId(location.getCityId());
|
||||
// location.setLocationEnName(cityInfo.getCityEnName());
|
||||
// } else if (level.equals(LOCATION_TYPE_COUNTY) && location.getLocationShortName().contains("D")) {
|
||||
// DistrictPOIInfoEntity byCityId = districtInfoRepository.findByCityId(location.getCityId());
|
||||
// location.setLocationEnName(byCityId.getDistrictEnName());
|
||||
// } else if (level.equals(LOCATION_TYPE_COUNTY)) {
|
||||
// CountryLevelInfoEntity byCityId = countryLevelInfoRepository.findByCityId(location.getCityId());
|
||||
// location.setLocationEnName(byCityId.getCountyEnName());
|
||||
// } else {
|
||||
// location.setLocationEnName("unknown");
|
||||
// }
|
||||
// }
|
||||
|
||||
CityEntity city = cityRepository.findByCityName(location.getLocationName());
|
||||
cityEntities.add(city);
|
||||
callbackDataBuilder.cityList()
|
||||
.cityName(location.getLocationName())
|
||||
.cityEnName(location.getLocationEnName())
|
||||
|
|
Loading…
Reference in New Issue