Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
3056ca80
Commit
3056ca80
authored
Jun 13, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aa
parent
1a3bc9ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
CertificationService.java
...xxfc/platform/universal/service/CertificationService.java
+10
-11
No files found.
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/CertificationService.java
View file @
3056ca80
...
@@ -266,7 +266,8 @@ public class CertificationService {
...
@@ -266,7 +266,8 @@ public class CertificationService {
//正面进行解析
//正面进行解析
String
front
=
imageParse
(
idInformation
.
getFrontUrl
(),
frontParameter
);
String
front
=
imageParse
(
idInformation
.
getFrontUrl
(),
frontParameter
);
String
back
=
imageParse
(
idInformation
.
getBackUrl
(),
backParameter
);
String
back
=
imageParse
(
idInformation
.
getBackUrl
(),
backParameter
);
log
.
info
(
"----解析front========="
+
front
);
log
.
info
(
"----解析back========="
+
back
);
if
(
StringUtils
.
isBlank
(
front
)
||
StringUtils
.
isBlank
(
back
))
{
if
(
StringUtils
.
isBlank
(
front
)
||
StringUtils
.
isBlank
(
back
))
{
return
ObjectRestResponse
.
createDefaultFail
();
return
ObjectRestResponse
.
createDefaultFail
();
}
}
...
@@ -319,14 +320,13 @@ public class CertificationService {
...
@@ -319,14 +320,13 @@ public class CertificationService {
//3.认证
//3.认证
String
result
=
certificate
(
authMap
);
String
result
=
certificate
(
authMap
);
log
.
info
(
"----认证结果result========="
+
result
);
//认证返回的参数是否为空
//认证返回的参数是否为空
if
(!
StringUtils
.
isBlank
(
result
))
{
if
(!
StringUtils
.
isBlank
(
result
))
{
Map
<
String
,
Object
>
map
=
(
Map
<
String
,
Object
>)
JSONObject
.
parse
(
result
);
Map
<
String
,
Object
>
map
=
(
Map
<
String
,
Object
>)
JSONObject
.
parse
(
result
);
System
.
out
.
println
(
map
.
get
(
certifRet
));
log
.
info
(
"----certifRet========="
+
certifRet
);
if
(
MapUtil
.
isNotEmpty
(
map
)
||
certifResultCode
.
equals
(
map
.
get
(
certifRet
)))
{
if
(
MapUtil
.
isNotEmpty
(
map
)
||
certifResultCode
.
equals
(
map
.
get
(
certifRet
)))
{
...
@@ -343,7 +343,7 @@ public class CertificationService {
...
@@ -343,7 +343,7 @@ public class CertificationService {
//获得到期时间
//获得到期时间
String
endDate
=
(
String
)
backData
.
get
(
expirationDateName
);
String
endDate
=
(
String
)
backData
.
get
(
expirationDateName
);
System
.
out
.
println
(
endDate
);
log
.
info
(
"----获得到期时间endDate========="
+
endDate
);
if
(
StringUtils
.
isBlank
(
endDate
))
{
if
(
StringUtils
.
isBlank
(
endDate
))
{
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
...
@@ -363,6 +363,7 @@ public class CertificationService {
...
@@ -363,6 +363,7 @@ public class CertificationService {
idInformation
.
setExpirationDate
(
expirationDate
);
idInformation
.
setExpirationDate
(
expirationDate
);
Boolean
aBoolean
=
addIdInformation
(
idInformation
);
Boolean
aBoolean
=
addIdInformation
(
idInformation
);
log
.
info
(
"----请求admin========="
+
aBoolean
);
if
(
aBoolean
)
{
if
(
aBoolean
)
{
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
...
@@ -389,8 +390,7 @@ public class CertificationService {
...
@@ -389,8 +390,7 @@ public class CertificationService {
//
//
try
{
try
{
log
.
info
(
"----querys========="
+
querys
);
System
.
out
.
println
(
querys
);
HttpResponse
response
=
CertifHttpUtils
.
doGet
(
cHost
,
cPath
,
cMethod
,
headers
,
querys
);
HttpResponse
response
=
CertifHttpUtils
.
doGet
(
cHost
,
cPath
,
cMethod
,
headers
,
querys
);
StatusLine
statusLine
=
response
.
getStatusLine
();
StatusLine
statusLine
=
response
.
getStatusLine
();
int
statusCode
=
statusLine
.
getStatusCode
();
int
statusCode
=
statusLine
.
getStatusCode
();
...
@@ -427,6 +427,7 @@ public class CertificationService {
...
@@ -427,6 +427,7 @@ public class CertificationService {
Map
<
String
,
String
>
querys
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
querys
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
bodys
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
bodys
=
new
HashMap
<
String
,
String
>();
bodys
.
put
(
picName
,
imageUrl
);
bodys
.
put
(
picName
,
imageUrl
);
//默认正面front,背面请传back
//默认正面front,背面请传back
...
@@ -439,8 +440,7 @@ public class CertificationService {
...
@@ -439,8 +440,7 @@ public class CertificationService {
StatusLine
statusLine
=
response
.
getStatusLine
();
StatusLine
statusLine
=
response
.
getStatusLine
();
int
statusCode
=
statusLine
.
getStatusCode
();
int
statusCode
=
statusLine
.
getStatusCode
();
log
.
info
(
"----statusCode========="
+
querys
);
System
.
out
.
println
(
statusCode
);
/**
/**
* 状态码: 200 正常;400 URL无效;401 appCode错误; 403 次数用完; 500 API网管错误
* 状态码: 200 正常;400 URL无效;401 appCode错误; 403 次数用完; 500 API网管错误
*/
*/
...
@@ -463,8 +463,7 @@ public class CertificationService {
...
@@ -463,8 +463,7 @@ public class CertificationService {
//认证通过保存到数据库当中
//认证通过保存到数据库当中
public
Boolean
addIdInformation
(
IdInformation
idInformation
)
{
public
Boolean
addIdInformation
(
IdInformation
idInformation
)
{
log
.
info
(
"----idInformation========="
+
idInformation
);
System
.
out
.
println
(
idInformation
);
//保存认证信息
//保存认证信息
try
{
try
{
...
...
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