|
|
@@ -3880,20 +3880,6 @@ public class HouseOrderController implements HouseOrderAPI {
|
|
|
|
|
|
@Override
|
|
|
public CommonResult tianditu(String ds, String tk) {
|
|
|
-// String url="http://api.tianditu.gov.cn/geocoder?ds="+ds+"&tk="+tk;
|
|
|
-
|
|
|
-// JSONObject map = new JSONObject();
|
|
|
-// map.put("keyWord",ds);
|
|
|
-//
|
|
|
-// String url="http://api.tianditu.gov.cn/geocoder?ds="+map.toString()+"&tk=" + tk;;
|
|
|
-// System.out.println("url = " + url);
|
|
|
-// RestTemplate restTemplate = new RestTemplate();
|
|
|
-// ResponseEntity<String> forEntity = restTemplate.getForEntity(url, String.class);
|
|
|
-// String body = forEntity.getBody();
|
|
|
-// JSONObject jsonObject = JSONObject.parseObject(body);
|
|
|
-// System.out.println("jsonObject = " + jsonObject);
|
|
|
-// return CommonResult.ok(jsonObject);
|
|
|
-
|
|
|
String url = "http://api.tianditu.gov.cn/geocoder";
|
|
|
Map<String, String> param = new HashMap<>();
|
|
|
JSONObject jsonObject2 = new JSONObject();
|
|
|
@@ -3902,7 +3888,6 @@ public class HouseOrderController implements HouseOrderAPI {
|
|
|
param.put("tk", tk);
|
|
|
String s = HttpClientUtil.doGet(url, param);
|
|
|
JSONObject jsonObject = JSONObject.parseObject(s);
|
|
|
- System.out.println("jsonObject = " + jsonObject);
|
|
|
String status = jsonObject.getString("status");
|
|
|
if ("0".equals(status)) {
|
|
|
return CommonResult.ok(jsonObject);
|
|
|
@@ -3910,7 +3895,6 @@ public class HouseOrderController implements HouseOrderAPI {
|
|
|
return CommonResult.fail();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
public static void main(String[] args) throws Exception {
|
|
|
// 获取签名
|
|
|
// 随机字符串
|