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
299a0f6d
Commit
299a0f6d
authored
Jul 12, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改实名认证,证件到期时间
parent
fe70118f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
8 deletions
+20
-8
CertificationService.java
...xxfc/platform/universal/service/CertificationService.java
+20
-8
No files found.
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/CertificationService.java
View file @
299a0f6d
...
...
@@ -24,6 +24,7 @@ import org.springframework.stereotype.Service;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
...
...
@@ -347,18 +348,29 @@ public class CertificationService {
return
ObjectRestResponse
.
succ
();
}
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
formatter
.
setLenient
(
false
);
Date
expirationDate
=
null
;
try
{
expirationDate
=
formatter
.
parse
(
endDate
);
}
catch
(
ParseException
e
)
{
Date
expirationDate
=
new
Date
();
if
(!
Validation
.
isDate
(
endDate
))
{
Date
date
=
new
Date
();
Calendar
c
=
Calendar
.
getInstance
();
c
.
setTime
(
date
);
c
.
add
(
Calendar
.
YEAR
,
100
);
expirationDate
=
c
.
getTime
();
e
.
printStackTrace
();
return
ObjectRestResponse
.
createDefaultFail
();
}
else
{
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
formatter
.
setLenient
(
false
);
try
{
expirationDate
=
formatter
.
parse
(
endDate
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
return
ObjectRestResponse
.
createDefaultFail
();
}
}
idInformation
.
setExpirationDate
(
expirationDate
);
Boolean
aBoolean
=
addIdInformation
(
idInformation
);
...
...
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