diff --git a/projects/fangjia-service/src/main/java/com/fangjia/service/index/SellTriggerServiceImpl.java b/projects/fangjia-service/src/main/java/com/fangjia/service/index/SellTriggerServiceImpl.java index 1f7ab6869..501865bc5 100644 --- a/projects/fangjia-service/src/main/java/com/fangjia/service/index/SellTriggerServiceImpl.java +++ b/projects/fangjia-service/src/main/java/com/fangjia/service/index/SellTriggerServiceImpl.java @@ -206,23 +206,23 @@ public class SellTriggerServiceImpl implements TriggerService { newObj.put("floor_range", getFloorRange(object)); -// if (null != district) { -// if (district.getLat() != null && district.getLng() != null && district.getLat() > 0 && district.getLng() > 0) { -// try { -// newObj.put("lat", district.getLat()); -// newObj.put("lng", district.getLng()); -// double lat = (district.getLat() / 10000000000.0); -// double lng = (district.getLng() / 10000000000.0); -// if (lat >= -90 && lat <= 90 && lng >= -180 && lng <= 180) { -// newObj.put("lat_lng", lat + "," + lng); -// } -// } catch (NumberFormatException e) { -// if (LOGGER.isErrorEnabled()) { -// LOGGER.error("error pase lat(" + district.getLat() + ") or lng("+ district.getLng() + "): ", e); -// } -// } -// } -// } + if (null != district) { + if (district.getLat() != null && district.getLng() != null && district.getLat() > 0 && district.getLng() > 0) { + try { + newObj.put("lat", district.getLat()); + newObj.put("lng", district.getLng()); + double lat = (district.getLat() / 10000000000.0); + double lng = (district.getLng() / 10000000000.0); + if (lat >= -90 && lat <= 90 && lng >= -180 && lng <= 180) { + newObj.put("lat_lng", lat + "," + lng); + } + } catch (NumberFormatException e) { + if (LOGGER.isErrorEnabled()) { + LOGGER.error("error pase lat(" + district.getLat() + ") or lng("+ district.getLng() + "): ", e); + } + } + } + } ReasonStatus status = sellDataFilter.apply(object, inputDate); if (isVisible(status)) {