Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jiwei-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
马天浩
jiwei-api
Commits
23edb4e9
Commit
23edb4e9
authored
Aug 27, 2020
by
张欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企查查接口
parent
bba9d0f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
QccController.java
.../java/com/mth/requestsecret/controller/QccController.java
+5
-4
No files found.
src/main/java/com/mth/requestsecret/controller/QccController.java
View file @
23edb4e9
package
com
.
mth
.
requestsecret
.
controller
;
package
com
.
mth
.
requestsecret
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mth.requestsecret.util.QccHttpUtil
;
import
com.mth.requestsecret.util.QccHttpUtil
;
import
com.mth.requestsecret.util.QccUtil
;
import
com.mth.requestsecret.util.QccUtil
;
import
org.apache.http.client.methods.HttpHead
;
import
org.apache.http.client.methods.HttpHead
;
import
org.json.JSONObject
;
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.HttpStatus
;
...
@@ -41,7 +41,7 @@ public class QccController {
...
@@ -41,7 +41,7 @@ public class QccController {
reqHeader
.
setHeader
(
"Timespan"
,
autherHeader
[
1
]);
reqHeader
.
setHeader
(
"Timespan"
,
autherHeader
[
1
]);
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
());
JSONObject
jObject
=
new
JSON
Object
(
resultJson
);
JSONObject
jObject
=
JSONObject
.
parse
Object
(
resultJson
);
log
.
info
(
"企查查企业查询接口返回结果为:"
+
resultJson
);
log
.
info
(
"企查查企业查询接口返回结果为:"
+
resultJson
);
return
new
ResponseEntity
<
JSONObject
>(
jObject
,
HttpStatus
.
OK
);
return
new
ResponseEntity
<
JSONObject
>(
jObject
,
HttpStatus
.
OK
);
}
}
...
@@ -61,7 +61,7 @@ public class QccController {
...
@@ -61,7 +61,7 @@ public class QccController {
reqHeader
.
setHeader
(
"Timespan"
,
autherHeader
[
1
]);
reqHeader
.
setHeader
(
"Timespan"
,
autherHeader
[
1
]);
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
());
JSONObject
jObject
=
new
JSON
Object
(
resultJson
);
JSONObject
jObject
=
JSONObject
.
parse
Object
(
resultJson
);
log
.
info
(
"企查查企业股东信息查询接口返回结果为:"
+
resultJson
);
log
.
info
(
"企查查企业股东信息查询接口返回结果为:"
+
resultJson
);
ResponseEntity
<
JSONObject
>
result
=
new
ResponseEntity
<
JSONObject
>(
jObject
,
HttpStatus
.
OK
);
ResponseEntity
<
JSONObject
>
result
=
new
ResponseEntity
<
JSONObject
>(
jObject
,
HttpStatus
.
OK
);
return
result
;
return
result
;
...
@@ -83,7 +83,8 @@ public class QccController {
...
@@ -83,7 +83,8 @@ public class QccController {
reqHeader
.
setHeader
(
"Timespan"
,
autherHeader
[
1
]);
reqHeader
.
setHeader
(
"Timespan"
,
autherHeader
[
1
]);
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
());
JSONObject
jObject
=
new
JSONObject
(
resultJson
);
JSONObject
jObject
=
JSONObject
.
parseObject
(
resultJson
);
log
.
info
(
"个人历史担任法人企业查询接口返回结果为:"
+
resultJson
);
log
.
info
(
"个人历史担任法人企业查询接口返回结果为:"
+
resultJson
);
return
new
ResponseEntity
<
JSONObject
>(
jObject
,
HttpStatus
.
OK
);
return
new
ResponseEntity
<
JSONObject
>(
jObject
,
HttpStatus
.
OK
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment