From 565acf1eb4e5d6ea4379d150524116c1df366861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E5=81=A5?= Date: Mon, 9 Aug 2021 09:10:28 +0800 Subject: [PATCH] t --- .../fangjia/script/temp/shenjian/Temp.groovy | 39 ------------------- 1 file changed, 39 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/Temp.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/Temp.groovy index 10e63221e..01d0e126d 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/Temp.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/Temp.groovy @@ -1,50 +1,11 @@ package com.fangjia.script.temp.shenjian -import com.alibaba.fastjson.JSONArray -import com.alibaba.fastjson.JSONObject -import com.baidubce.http.ApiExplorerClient -import com.baidubce.http.AppSigner -import com.baidubce.http.HttpMethodName -import com.baidubce.model.ApiExplorerRequest -import com.baidubce.model.ApiExplorerResponse -import com.fangjia.script.statistics.poi.AmapPoi -import com.fangjia.script.temp.shenjian.util.SeaweedUtils -import org.elasticsearch.geometry.utils.Geohash - /** * @author shenjian* @since 2021/5/18 */ class Temp { static void main(String[] args) { - String path = "https://goojia.api.bdymkt.com/estimate"; - ApiExplorerRequest request = new ApiExplorerRequest(HttpMethodName.GET, path); - request.setCredentials("fccf809a0f7748449154af926897aecb", "af1f0088a05c493ab20133ba470f87ef "); - // 设置header参数 - request.addHeaderParameter("Content-Type", "application/json; charset=utf-8"); - - // 设置query参数 - request.addQueryParameter("address", "上海宝山呼玛三村"); - request.addQueryParameter("city", "上海"); - request.addQueryParameter("size", "100"); - - - ApiExplorerClient client = new ApiExplorerClient(new AppSigner()); - - try { - ApiExplorerResponse response = client.sendRequest(request); - // 返回结果格式为Json字符串 - System.out.println(response.getResult()); - } catch (Exception e) { - e.printStackTrace(); - } } - -// 万友七季城C区 经度纬度不同106.569161 29.498502 原始106.56881 29.50058 距离231.7003米 -// 马道子 经度纬度不同106.384087 29.66009 原始106.450656 29.550612 距离12306.7728米 -// 富洲新城 经度纬度不同106.474475 29.537152 原始106.420021 29.537655 距离1836.9266米 -// 滨江国际 经度纬度不同109.466428 31.01454 原始109.46799 31.016907 距离308.3405米 -// 澳海澜庭 经度纬度不同109.389067 31.020248 原始109.389069 31.02025 距离0.3029米 -// 富洲新城 经度纬度不同106.474475 29.537152 原始106.420021 29.537655 距离1836.9266米 }