Commit a8d75770 authored by matianhao's avatar matianhao

Merge remote-tracking branch 'origin/master'

parents 237f463a e7c9475f
...@@ -6,6 +6,8 @@ import com.mth.requestsecret.util.QccUtil; ...@@ -6,6 +6,8 @@ import com.mth.requestsecret.util.QccUtil;
import org.apache.http.client.methods.HttpHead; import org.apache.http.client.methods.HttpHead;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -29,8 +31,8 @@ public class QccController { ...@@ -29,8 +31,8 @@ public class QccController {
* @param keyword * @param keyword
* @return * @return
*/ */
@GetMapping("/qiyeSearch") @PostMapping("/qiyeSearch")
public String qiyeSearch(@RequestParam String keyword) throws Exception { public ResponseEntity<String> qiyeSearch(@RequestParam String keyword) throws Exception {
String interfaceUrl = "http://api.qichacha.com/ECIV4/Search"; String interfaceUrl = "http://api.qichacha.com/ECIV4/Search";
HttpHead reqHeader = new HttpHead(); HttpHead reqHeader = new HttpHead();
String[] autherHeader = QccUtil.RandomAuthentHeader(appkey,seckey); String[] autherHeader = QccUtil.RandomAuthentHeader(appkey,seckey);
...@@ -39,7 +41,7 @@ public class QccController { ...@@ -39,7 +41,7 @@ public class QccController {
String reqUri = interfaceUrl.concat("?key=").concat(appkey).concat("&keyword=").concat(keyword); String reqUri = interfaceUrl.concat("?key=").concat(appkey).concat("&keyword=").concat(keyword);
String resultJson = QccHttpUtil.httpGet(reqUri, reqHeader.getAllHeaders()); String resultJson = QccHttpUtil.httpGet(reqUri, reqHeader.getAllHeaders());
log.info("企查查企业查询接口返回结果为:"+resultJson); log.info("企查查企业查询接口返回结果为:"+resultJson);
return resultJson; return new ResponseEntity<String>(resultJson, HttpStatus.OK);
} }
...@@ -48,8 +50,8 @@ public class QccController { ...@@ -48,8 +50,8 @@ public class QccController {
* @param keyword * @param keyword
* @return * @return
*/ */
@GetMapping("/qiyePartnerInfoQuery") @PostMapping("/qiyePartnerInfoQuery")
public String qiyePartnerInfoQuery(@RequestParam String keyword) throws Exception { public ResponseEntity<String> qiyePartnerInfoQuery(@RequestParam String keyword) throws Exception {
String interfaceUrl = "http://api.qichacha.com/ECIPartner/GetList"; String interfaceUrl = "http://api.qichacha.com/ECIPartner/GetList";
HttpHead reqHeader = new HttpHead(); HttpHead reqHeader = new HttpHead();
String[] autherHeader = QccUtil.RandomAuthentHeader(appkey,seckey); String[] autherHeader = QccUtil.RandomAuthentHeader(appkey,seckey);
...@@ -58,7 +60,8 @@ public class QccController { ...@@ -58,7 +60,8 @@ public class QccController {
String reqUri = interfaceUrl.concat("?key=").concat(appkey).concat("&searchKey=").concat(keyword); String reqUri = interfaceUrl.concat("?key=").concat(appkey).concat("&searchKey=").concat(keyword);
String resultJson = QccHttpUtil.httpGet(reqUri, reqHeader.getAllHeaders()); String resultJson = QccHttpUtil.httpGet(reqUri, reqHeader.getAllHeaders());
log.info("企查查企业股东信息查询接口返回结果为:"+resultJson); log.info("企查查企业股东信息查询接口返回结果为:"+resultJson);
return resultJson; ResponseEntity<String> result = new ResponseEntity<String>(resultJson, HttpStatus.OK);
return result;
} }
...@@ -68,8 +71,8 @@ public class QccController { ...@@ -68,8 +71,8 @@ public class QccController {
* @param personName 人员姓名 * @param personName 人员姓名
* @return * @return
*/ */
@GetMapping("/personHisOperCompany") @PostMapping("/personHisOperCompany")
public String personHisOperCompany(@RequestParam String searchKey,@RequestParam String personName) throws Exception { public ResponseEntity<String> personHisOperCompany(@RequestParam String searchKey,@RequestParam String personName) throws Exception {
String interfaceUrl = "http://api.qichacha.com/PersonHisOperCompany/GetList"; String interfaceUrl = "http://api.qichacha.com/PersonHisOperCompany/GetList";
HttpHead reqHeader = new HttpHead(); HttpHead reqHeader = new HttpHead();
String[] autherHeader = QccUtil.RandomAuthentHeader(appkey,seckey); String[] autherHeader = QccUtil.RandomAuthentHeader(appkey,seckey);
...@@ -78,7 +81,7 @@ public class QccController { ...@@ -78,7 +81,7 @@ public class QccController {
String reqUri = interfaceUrl.concat("?key=").concat(appkey).concat("&searchKey=").concat(searchKey).concat("&personName=").concat(personName); String reqUri = interfaceUrl.concat("?key=").concat(appkey).concat("&searchKey=").concat(searchKey).concat("&personName=").concat(personName);
String resultJson = QccHttpUtil.httpGet(reqUri, reqHeader.getAllHeaders()); String resultJson = QccHttpUtil.httpGet(reqUri, reqHeader.getAllHeaders());
log.info("个人历史担任法人企业查询接口返回结果为:"+resultJson); log.info("个人历史担任法人企业查询接口返回结果为:"+resultJson);
return resultJson; return new ResponseEntity<String>(resultJson, 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