Commit 23edb4e9 authored by 张欣's avatar 张欣

企查查接口

parent bba9d0f4
package com.mth.requestsecret.controller;
import com.alibaba.fastjson.JSONObject;
import com.mth.requestsecret.util.QccHttpUtil;
import com.mth.requestsecret.util.QccUtil;
import org.apache.http.client.methods.HttpHead;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
......@@ -41,7 +41,7 @@ public class QccController {
reqHeader.setHeader("Timespan", autherHeader[1]);
String reqUri = interfaceUrl.concat("?key=").concat(appkey).concat("&keyword=").concat(keyword);
String resultJson = QccHttpUtil.httpGet(reqUri, reqHeader.getAllHeaders());
JSONObject jObject = new JSONObject(resultJson);
JSONObject jObject = JSONObject.parseObject(resultJson);
log.info("企查查企业查询接口返回结果为:"+resultJson);
return new ResponseEntity<JSONObject>(jObject, HttpStatus.OK);
}
......@@ -61,7 +61,7 @@ public class QccController {
reqHeader.setHeader("Timespan", autherHeader[1]);
String reqUri = interfaceUrl.concat("?key=").concat(appkey).concat("&searchKey=").concat(keyword);
String resultJson = QccHttpUtil.httpGet(reqUri, reqHeader.getAllHeaders());
JSONObject jObject = new JSONObject(resultJson);
JSONObject jObject = JSONObject.parseObject(resultJson);
log.info("企查查企业股东信息查询接口返回结果为:"+resultJson);
ResponseEntity<JSONObject> result = new ResponseEntity<JSONObject>(jObject, HttpStatus.OK);
return result;
......@@ -83,7 +83,8 @@ public class QccController {
reqHeader.setHeader("Timespan", autherHeader[1]);
String reqUri = interfaceUrl.concat("?key=").concat(appkey).concat("&searchKey=").concat(searchKey).concat("&personName=").concat(personName);
String resultJson = QccHttpUtil.httpGet(reqUri, reqHeader.getAllHeaders());
JSONObject jObject = new JSONObject(resultJson);
JSONObject jObject = JSONObject.parseObject(resultJson);
log.info("个人历史担任法人企业查询接口返回结果为:"+resultJson);
return new ResponseEntity<JSONObject>(jObject, HttpStatus.OK);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment