Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cs-mfa-gov
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
张京坤
cs-mfa-gov
Commits
ea63959a
提交
ea63959a
authored
12月 10, 2024
作者:
ZhangJingKun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1
上级
28adf5a2
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
43 行增加
和
5 行删除
+43
-5
vcs.xml
.idea/vcs.xml
+7
-0
QixinServerImpl.java
...n/java/com/zzsn/csmfagov/server/impl/QixinServerImpl.java
+35
-4
application.yml
src/main/resources/application.yml
+1
-1
没有找到文件。
.idea/vcs.xml
0 → 100644
浏览文件 @
ea63959a
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"VcsDirectoryMappings"
>
<mapping
directory=
"$PROJECT_DIR$"
vcs=
"Git"
/>
</component>
</project>
\ No newline at end of file
src/main/java/com/zzsn/csmfagov/server/impl/QixinServerImpl.java
浏览文件 @
ea63959a
package
com
.
zzsn
.
csmfagov
.
server
.
impl
;
package
com
.
zzsn
.
csmfagov
.
server
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson2.JSONArray
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.zzsn.csmfagov.server.QixinServer
;
import
com.zzsn.csmfagov.server.QixinServer
;
import
com.zzsn.csmfagov.vo.Result
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -18,6 +18,7 @@ import com.mashape.unirest.http.*;
...
@@ -18,6 +18,7 @@ import com.mashape.unirest.http.*;
@Slf4j
@Slf4j
public
class
QixinServerImpl
implements
QixinServer
{
public
class
QixinServerImpl
implements
QixinServer
{
//59.5 主要人员对外投资任职信息
String
baseUrl
=
"https://api.qixin.com/APIService/personInfo/getNPInvestAndPositionByName"
;
String
baseUrl
=
"https://api.qixin.com/APIService/personInfo/getNPInvestAndPositionByName"
;
String
appkey
=
"2e46b0d9-7352-43c0-b800-9d7f5e1de8e5"
;
String
appkey
=
"2e46b0d9-7352-43c0-b800-9d7f5e1de8e5"
;
String
secretKey
=
"b6183639-2045-47fb-9640-90905e7b53b6"
;
String
secretKey
=
"b6183639-2045-47fb-9640-90905e7b53b6"
;
...
@@ -57,10 +58,40 @@ public class QixinServerImpl implements QixinServer {
...
@@ -57,10 +58,40 @@ public class QixinServerImpl implements QixinServer {
log
.
info
(
"body---{}"
,
body
);
log
.
info
(
"body---{}"
,
body
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
body
,
JSONObject
.
class
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
body
,
JSONObject
.
class
);
String
status
=
jsonObject
.
getString
(
"status"
);
String
status
=
jsonObject
.
getString
(
"status"
);
Integer
i
=
Integer
.
valueOf
(
status
);
Integer
statusInt
=
Integer
.
valueOf
(
status
);
//响应状态码在200-209时直接返回
//响应状态码在200-209时直接返回
if
(
i
>=
200
&&
i
<=
209
){
if
(
statusInt
>=
200
&&
statusInt
<=
209
){
return
body
;
JSONObject
data
=
jsonObject
.
getJSONObject
(
"data"
);
JSONArray
invest_info
=
data
.
getJSONArray
(
"invest_info"
);
//股东信息列表 1
JSONArray
oper_info
=
data
.
getJSONArray
(
"oper_info"
);
//法人代表信息列表 2
JSONArray
manager_info
=
data
.
getJSONArray
(
"manager_info"
);
//高管信息列表 3
JSONArray
resJSONArray
=
new
JSONArray
();
if
(
invest_info
!=
null
&&
invest_info
.
size
()
>
0
){
for
(
int
i
=
0
;
i
<
invest_info
.
size
();
i
++){
JSONObject
jj
=
invest_info
.
getJSONObject
(
i
);
jj
.
put
(
"type"
,
"1"
);
}
resJSONArray
.
addAll
(
invest_info
);
}
if
(
oper_info
!=
null
&&
oper_info
.
size
()
>
0
){
for
(
int
i
=
0
;
i
<
oper_info
.
size
();
i
++){
JSONObject
jj
=
oper_info
.
getJSONObject
(
i
);
jj
.
put
(
"type"
,
"2"
);
}
resJSONArray
.
addAll
(
oper_info
);
}
if
(
manager_info
!=
null
&&
manager_info
.
size
()
>
0
){
for
(
int
i
=
0
;
i
<
manager_info
.
size
();
i
++){
JSONObject
jj
=
manager_info
.
getJSONObject
(
i
);
jj
.
put
(
"type"
,
"3"
);
}
resJSONArray
.
addAll
(
manager_info
);
}
jsonObject
.
put
(
"data"
,
resJSONArray
);
return
JSON
.
toJSONString
(
jsonObject
);
}
else
{
}
else
{
JSONObject
res
=
new
JSONObject
();
JSONObject
res
=
new
JSONObject
();
res
.
put
(
"status"
,
"500"
);
res
.
put
(
"status"
,
"500"
);
...
...
src/main/resources/application.yml
浏览文件 @
ea63959a
...
@@ -10,7 +10,7 @@ spring:
...
@@ -10,7 +10,7 @@ spring:
password
:
zzsn9988
password
:
zzsn9988
redis
:
redis
:
database
:
0
database
:
0
host
:
1
14.116.90.53
host
:
1
.95.69.2
password
:
RPHZgkDQ4zGJ
password
:
RPHZgkDQ4zGJ
port
:
6380
port
:
6380
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论