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
68c2ff6f
Commit
68c2ff6f
authored
Aug 27, 2020
by
张欣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接企查查接口加分页
parent
d8476a84
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
QccController.java
.../java/com/mth/requestsecret/controller/QccController.java
+9
-6
No files found.
src/main/java/com/mth/requestsecret/controller/QccController.java
View file @
68c2ff6f
...
...
@@ -33,13 +33,14 @@ public class QccController {
* @return
*/
@GetMapping
(
"/qiyeSearch"
)
public
ResponseEntity
<
JSONObject
>
qiyeSearch
(
@RequestParam
String
keyword
)
throws
Exception
{
public
ResponseEntity
<
JSONObject
>
qiyeSearch
(
@RequestParam
String
keyword
,
@RequestParam
String
pageSize
,
@RequestParam
String
pageIndex
)
throws
Exception
{
String
interfaceUrl
=
"http://api.qichacha.com/ECIV4/Search"
;
HttpHead
reqHeader
=
new
HttpHead
();
String
[]
autherHeader
=
QccUtil
.
RandomAuthentHeader
(
appkey
,
seckey
);
reqHeader
.
setHeader
(
"Token"
,
autherHeader
[
0
]);
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
)
.
concat
(
"&pageSize="
).
concat
(
pageSize
).
concat
(
"&pageIndex="
).
concat
(
pageIndex
);
String
resultJson
=
QccHttpUtil
.
httpGet
(
reqUri
,
reqHeader
.
getAllHeaders
());
JSONObject
jObject
=
JSONObject
.
parseObject
(
resultJson
);
log
.
info
(
"企查查企业查询接口返回结果为:"
+
resultJson
);
...
...
@@ -53,13 +54,14 @@ public class QccController {
* @return
*/
@GetMapping
(
"/qiyePartnerInfoQuery"
)
public
ResponseEntity
<
JSONObject
>
qiyePartnerInfoQuery
(
@RequestParam
String
keyword
)
throws
Exception
{
public
ResponseEntity
<
JSONObject
>
qiyePartnerInfoQuery
(
@RequestParam
String
keyword
,
@RequestParam
String
pageSize
,
@RequestParam
String
pageIndex
)
throws
Exception
{
String
interfaceUrl
=
"http://api.qichacha.com/ECIPartner/GetList"
;
HttpHead
reqHeader
=
new
HttpHead
();
String
[]
autherHeader
=
QccUtil
.
RandomAuthentHeader
(
appkey
,
seckey
);
reqHeader
.
setHeader
(
"Token"
,
autherHeader
[
0
]);
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
)
.
concat
(
"&pageSize="
).
concat
(
pageSize
).
concat
(
"&pageIndex="
).
concat
(
pageIndex
);
String
resultJson
=
QccHttpUtil
.
httpGet
(
reqUri
,
reqHeader
.
getAllHeaders
());
JSONObject
jObject
=
JSONObject
.
parseObject
(
resultJson
);
log
.
info
(
"企查查企业股东信息查询接口返回结果为:"
+
resultJson
);
...
...
@@ -75,13 +77,14 @@ public class QccController {
* @return
*/
@GetMapping
(
"/personHisOperCompany"
)
public
ResponseEntity
<
JSONObject
>
personHisOperCompany
(
@RequestParam
String
searchKey
,
@RequestParam
String
personName
)
throws
Exception
{
public
ResponseEntity
<
JSONObject
>
personHisOperCompany
(
@RequestParam
String
searchKey
,
@RequestParam
String
personName
,
@RequestParam
String
pageSize
,
@RequestParam
String
pageIndex
)
throws
Exception
{
String
interfaceUrl
=
"http://api.qichacha.com/PersonHisOperCompany/GetList"
;
HttpHead
reqHeader
=
new
HttpHead
();
String
[]
autherHeader
=
QccUtil
.
RandomAuthentHeader
(
appkey
,
seckey
);
reqHeader
.
setHeader
(
"Token"
,
autherHeader
[
0
]);
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
)
.
concat
(
"&pageSize="
).
concat
(
pageSize
).
concat
(
"&pageIndex="
).
concat
(
pageIndex
);
String
resultJson
=
QccHttpUtil
.
httpGet
(
reqUri
,
reqHeader
.
getAllHeaders
());
JSONObject
jObject
=
JSONObject
.
parseObject
(
resultJson
);
...
...
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