Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
谢明辉
/
VVAS-Match
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit fa8471fb
authored
May 14, 2021
by
xmh
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复当返回值没有counttime时的报错
1 parent
ac310f68
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
src/main/java/com/viontech/match/service/PersonService.java
src/main/java/com/viontech/match/service/PersonService.java
View file @
fa8471f
...
@@ -36,6 +36,7 @@ import org.springframework.stereotype.Service;
...
@@ -36,6 +36,7 @@ import org.springframework.stereotype.Service;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
java.util.stream.Stream
;
...
@@ -363,7 +364,17 @@ public class PersonService {
...
@@ -363,7 +364,17 @@ public class PersonService {
p
.
setGender
((
String
)
source
.
get
(
"gender"
));
p
.
setGender
((
String
)
source
.
get
(
"gender"
));
p
.
setChannelSerialNum
((
String
)
source
.
get
(
"channelSerialNum"
));
p
.
setChannelSerialNum
((
String
)
source
.
get
(
"channelSerialNum"
));
p
.
setBodyType
((
Integer
)
source
.
get
(
"body_type"
));
p
.
setBodyType
((
Integer
)
source
.
get
(
"body_type"
));
p
.
setCounttime
(
Constant
.
DATE_FORMAT
.
get
().
parse
((
String
)
source
.
get
(
"counttime"
)));
p
.
setCounttime
(
Optional
.
ofNullable
((
String
)
source
.
get
(
"counttime"
))
.
map
(
x
->
{
try
{
return
Constant
.
DATE_FORMAT
.
get
().
parse
(
x
);
}
catch
(
ParseException
ignore
)
{
}
return
null
;
})
.
orElse
(
null
));
p
.
setScore
((
int
)
item
.
getScore
());
p
.
setScore
((
int
)
item
.
getScore
());
p
.
setPersonPoolId
(
item
.
getIndex
());
p
.
setPersonPoolId
(
item
.
getIndex
());
persons
.
add
(
p
);
persons
.
add
(
p
);
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment