From 23cc7f2ae0df00e96bde8994dc30a981d21daca0 Mon Sep 17 00:00:00 2001 From: majintao Date: Mon, 10 Mar 2025 18:02:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=99=E5=AD=97=E6=A5=BC=E5=9C=B0=E5=9D=80?= =?UTF-8?q?=E4=BC=B0=E5=80=BC=E7=BB=93=E6=9E=9C=E5=8C=BA=E5=9F=9F=E6=94=B9?= =?UTF-8?q?=E6=88=90=E7=AE=80=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fangjia/service/datastore/OfficeServiceImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/fangjia-service/src/main/java/com/fangjia/service/datastore/OfficeServiceImpl.java b/projects/fangjia-service/src/main/java/com/fangjia/service/datastore/OfficeServiceImpl.java index f4e16b4df..aedf7bddb 100644 --- a/projects/fangjia-service/src/main/java/com/fangjia/service/datastore/OfficeServiceImpl.java +++ b/projects/fangjia-service/src/main/java/com/fangjia/service/datastore/OfficeServiceImpl.java @@ -1,5 +1,6 @@ package com.fangjia.service.datastore; +import com.fangjia.core.RegionData; import com.fangjia.core.util.CacheUtils; import com.fangjia.core.util.DataUtil; import com.fangjia.core.util.DateUtil; @@ -356,10 +357,10 @@ public class OfficeServiceImpl implements OfficeService { GaodeDto gaodeDto = getGaodeGeo(evaluation.getCity(), evaluation.getAddress()); if (gaodeDto.getLng() != null && gaodeDto.getLat() != null) { evaluation.setLocation(gaodeDto.getLng() + "," + gaodeDto.getLat()); - }else { + } else { evaluation.setLocation(""); } - evaluation.setRegion(gaodeDto.getDistrict()); + evaluation.setRegion(RegionData.formatRegion(evaluation.getCity(), gaodeDto.getDistrict())); return rentEvaluateByLocation(evaluation); } @@ -441,6 +442,7 @@ public class OfficeServiceImpl implements OfficeService { } return ""; } + private GaodeDto getGaodeGeo(String city, String address) { GaodeDto gaodeDto = GeoUtils.geo(city, address); return gaodeDto;