评估添加解析楼层

This commit is contained in:
2023-08-29 15:37:55 +08:00
parent e92c66d484
commit 0b3bf0e297
4 changed files with 60 additions and 1 deletions
@@ -84,5 +84,9 @@ public interface AddressMatchProxyService {
* @return
*/
MatchDistrictResult checkMatchDistrictCorrect(CheckMatchDistrictCorrectParam param);
JSONObject addressStructure(String city, String address);
}
@@ -271,7 +271,29 @@ public class AddressMatchProxyServiceImpl extends AbstractHttpApiService impleme
}
return matchResult;
}
@Override
public JSONObject addressStructure(String city, String address) {
HttpRequest request = new HttpRequest();
JSONObject json = null;
Map<String, String> params = new HashMap<String, String>();
params.put("city", city);
params.put("address", address);
try {
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/structure/v2", params, "UTF-8");
if (json != null) {
int code = json.getInt("status");
String msg = json.getString("msg");
if (json.containsKey("result")) {
return (JSONObject) json.get("result");
}
}
}catch(Exception e){
LOGGER.error("地址标准化失败", e);
}
return null;
}
/**
* 获取高德中分数最高的信息
* @param city