Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
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
head_group
xyqb-user2
Commits
77a9f7dd
Commit
77a9f7dd
authored
May 19, 2020
by
xiaoguang.xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复错误联系人数据报错问题。
parent
a2173417
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
ContactController.java
...qb/controller/middleoffice/contact/ContactController.java
+11
-10
No files found.
src/main/java/cn/quantgroup/xyqb/controller/middleoffice/contact/ContactController.java
View file @
77a9f7dd
...
...
@@ -74,18 +74,19 @@ public class ContactController {
Long
userId
=
contactSaveDto
.
getUserId
();
List
<
Contact
>
contacts
=
contactSaveDto
.
getContacts
();
Timestamp
now
=
new
Timestamp
(
System
.
currentTimeMillis
());
contacts
.
stream
()
.
filter
(
Contact:
:
valid
)
.
forEach
(
contact
->
{
contact
.
setUserId
(
userId
);
contact
.
setBizType
(
contactSaveDto
.
getBizType
());
contact
.
setCreatedAt
(
now
);
contact
.
setUpdatedAt
(
now
);
});
if
(
contacts
.
isEmpty
())
{
List
<
Contact
>
collect
=
contacts
.
stream
()
.
filter
(
Contact:
:
valid
)
.
collect
(
Collectors
.
toList
());
collect
.
forEach
(
contact
->
{
contact
.
setUserId
(
userId
);
contact
.
setBizType
(
contactSaveDto
.
getBizType
());
contact
.
setCreatedAt
(
now
);
contact
.
setUpdatedAt
(
now
);
});
if
(
collect
.
isEmpty
())
{
return
JsonResult
.
buildErrorStateResult
(
"数据格式错误"
,
null
);
}
contactService
.
save
(
co
ntacts
);
contactService
.
save
(
co
llect
);
return
JsonResult
.
buildSuccessResult
();
}
...
...
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