diff --git a/src/main/java/com/chint/domain/service/order_sync/LYOrderSyncAdapter.java b/src/main/java/com/chint/domain/service/order_sync/LYOrderSyncAdapter.java index eb92f273..4093bcdb 100644 --- a/src/main/java/com/chint/domain/service/order_sync/LYOrderSyncAdapter.java +++ b/src/main/java/com/chint/domain/service/order_sync/LYOrderSyncAdapter.java @@ -217,9 +217,9 @@ public class LYOrderSyncAdapter implements SupplierOrderSync { private Location getCityLocation(Location location) { - if (location.getLevel().equals(LOCATION_TYPE_CITY)) { + if (location.getLocationType().equals(LOCATION_TYPE_CITY)) { return location; - } else if (location.getLevel().equals(LOCATION_LEVEL_COUNTY)) { + } else if (location.getLocationType().equals(LOCATION_LEVEL_COUNTY) || location.getLocationType().equals(LOCATION_TYPE_DISTRICT)) { return locationRepository.findById(location.getParentLocationId()); } else if (location.getLocationType().equals(LOCATION_TYPE_AIRPORT)) { //如果是机场的话,要查询出对应的地级市