Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zhj-report
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
data-spider
zhj-report
Commits
02711475
Commit
02711475
authored
Apr 20, 2020
by
郝彦辉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删掉测试方法
parent
11ee01e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
73 deletions
+0
-73
ReportController.java
src/main/java/com/controller/ReportController.java
+0
-6
ReportService.java
src/main/java/com/service/report/ReportService.java
+0
-1
IReportServiceImpl.java
...main/java/com/service/report/impl/IReportServiceImpl.java
+0
-66
No files found.
src/main/java/com/controller/ReportController.java
View file @
02711475
...
...
@@ -272,12 +272,6 @@ public class ReportController {
return
JSON
.
toJSONString
(
resultMap
);
}
@RequestMapping
(
"/query/judicial2"
)
public
String
judicial2
(
String
sname
,
String
stype
,
String
sreason
,
String
sno
)
{
Map
<
String
,
String
>
resultMap
=
reportService
.
judicial2
(
sname
,
stype
,
sreason
,
sno
);
return
JSON
.
toJSONString
(
resultMap
);
}
/**
* -----------------------------------------------------------------------------<br>
* 描 述: 查看最大查询量的耗用情况、查询状态 <br>
...
...
src/main/java/com/service/report/ReportService.java
View file @
02711475
...
...
@@ -56,7 +56,6 @@ public interface ReportService {
//司法数据查询
Map
<
String
,
String
>
judicial
(
String
sname
,
String
stype
,
String
sreason
,
String
sno
);
Map
<
String
,
String
>
judicial2
(
String
sname
,
String
stype
,
String
sreason
,
String
sno
);
//耗用查询量查询
Map
<
String
,
String
>
querycontral
();
...
...
src/main/java/com/service/report/impl/IReportServiceImpl.java
View file @
02711475
...
...
@@ -858,72 +858,6 @@ public class IReportServiceImpl implements ReportService {
}
}
public
Map
<
String
,
String
>
judicial2
(
String
sname
,
String
stype
,
String
sreason
,
String
sno
)
{
log
.
info
(
"中互金司法数据查询入参, sname: {} , stype: {} , sreason: {} , sno: {} "
,
sname
,
stype
,
sreason
,
sno
);
if
(
StringUtils
.
isAnyBlank
(
sname
,
stype
,
sreason
,
sno
)){
return
ImmutableMap
.
of
(
"code"
,
"301"
,
"msg"
,
"参数不能为空"
,
"data"
,
null
);
}
// 构造body
Map
<
String
,
String
>
bodyMap
=
new
HashMap
<
String
,
String
>();
bodyMap
.
put
(
"sname"
,
"胡悦"
);
bodyMap
.
put
(
"stype"
,
"0"
);
bodyMap
.
put
(
"sreason"
,
"b"
);
bodyMap
.
put
(
"sno"
,
"450421199308015582"
);
System
.
out
.
println
(
"[body]: \n"
+
utils
.
map2Json
(
bodyMap
));
// 构造header
Map
<
String
,
String
>
headerMap
=
getHeaderMap2
(
bodyMap
);
System
.
out
.
println
(
"[header]: \n"
+
utils
.
map2Json
(
headerMap
));
log
.
info
(
"中互金司法数据查询开始, sname: {} , stype: {} , sreason: {} , sno: {} , header: {} , body: {} "
,
sname
,
stype
,
sreason
,
sno
,
JSON
.
toJSONString
(
headerMap
),
JSON
.
toJSONString
(
bodyMap
));
ClientResponse
resp
=
null
;
try
{
resp
=
reportJerseyClient
.
post
(
headerMap
,
bodyMap
,
reportConfig
.
getInfoPeopleUrl
());
if
(
resp
!=
null
){
String
result
=
resp
.
getEntity
(
String
.
class
);
int
status
=
resp
.
getStatus
();
log
.
info
(
"中互金司法数据查询结束, sname: {} , stype: {} , sreason: {} , sno: {} , result: {} , status: {} "
,
sname
,
stype
,
sreason
,
sno
,
result
,
status
);
if
(
resp
.
getStatus
()
==
200
)
{
return
ImmutableMap
.
of
(
"code"
,
"200"
,
"msg"
,
"查询成功"
,
"data"
,
result
);
}
else
{
log
.
info
(
"中互金司法数据查询结束, sname: {} , stype: {} , sreason: {} , sno: {} , 调用失败: {} "
,
sname
,
stype
,
sreason
,
sno
,
JSON
.
toJSONString
(
resp
));
return
ImmutableMap
.
of
(
"code"
,
"999"
,
"msg"
,
"查询接口失败status="
+
status
,
"data"
,
result
);
}
}
else
{
log
.
info
(
"中互金司法数据查询结束, sname: {} , stype: {} , sreason: {} , sno: {} , result is Null."
,
sname
,
stype
,
sreason
,
sno
);
return
ImmutableMap
.
of
(
"code"
,
"500"
,
"msg"
,
"中互金司法数据查询接口返回结果为空"
);
}
}
catch
(
Exception
e
){
log
.
error
(
"中互金司法数据查询异常, sname: {} , stype: {} , sreason: {} , sno: {} "
,
sname
,
stype
,
sreason
,
sno
,
e
);
return
ImmutableMap
.
of
(
"code"
,
"500"
,
"msg"
,
"调用中互金司法数据接口请求异常"
);
}
}
private
Map
<
String
,
String
>
getHeaderMap2
(
Map
<
String
,
String
>
map
)
{
//
String
scode
=
utils
.
getRandomNumber
(
10
);
//10位随机数
// 构造签名 用于身份验证
String
preparedSign
=
reportConfig
.
getCode
()
+
scode
+
map
.
get
(
"sname"
)
+
map
.
get
(
"stype"
)
+
map
.
get
(
"sreason"
)
+
map
.
get
(
"sno"
)
+
reportConfig
.
getInterFaceKey
();
String
sign
=
utils
.
sha256
(
preparedSign
);
// 构造header
Map
<
String
,
String
>
headerMap
=
new
HashMap
<
String
,
String
>();
headerMap
.
put
(
"sbankcode"
,
reportConfig
.
getCode
());
headerMap
.
put
(
"scode"
,
scode
);
headerMap
.
put
(
"sign"
,
sign
);
return
headerMap
;
}
/**
* -----------------------------------------------------------------------------<br>
* 描 述: 查看最大查询量的耗用情况、查询状态 <br>
...
...
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