评估添加解析楼层
This commit is contained in:
+4
@@ -84,5 +84,9 @@ public interface AddressMatchProxyService {
|
||||
* @return
|
||||
*/
|
||||
MatchDistrictResult checkMatchDistrictCorrect(CheckMatchDistrictCorrectParam param);
|
||||
|
||||
|
||||
|
||||
JSONObject addressStructure(String city, String address);
|
||||
|
||||
}
|
||||
|
||||
+23
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user