Commit fd1ea2bd by 丁伟峰

日志

1 parent 41255a73
......@@ -143,18 +143,19 @@ public class CapacityQueryServiceImpl implements CapacityQueryService {
String url;
MultiValueMap<String, Object> params = new LinkedMultiValueMap<>();
params.add("ak", "284c57cbabad4755a9c657885a8df3e2");
if (location != null && !location.isEmpty()) {
if (location != null && !location.isBlank()) {
url = "https://pea-test.bshg.com.cn/v2/xyfendan";
params.add("coordinate", location);
} else {
url = "https://pea-test.bshg.com.cn/v2/fendan";
params.add("addresses", String.format("[{\"address\":\"%s\"}]", address));
}
params.add("need_district", "true");
params.add("need_district", "false");
params.add("need_layer", "true");
params.add("related_point_fields", "");
params.add("area_fields", "名称,唯一编号");
log.info("request params ==> {}", params);
// 构建请求实体
HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(params, headers);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!