Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gogirl-miniapp-backend
Overview
Overview
Details
Activity
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
huluobin
gogirl-miniapp-backend
Commits
61b1528d
Commit
61b1528d
authored
Jul 01, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
6b566d73
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
ScheduleManageServiceImpl.java
...plication/order/serve/impl/ScheduleManageServiceImpl.java
+16
-7
No files found.
src/main/java/com/gogirl/application/order/serve/impl/ScheduleManageServiceImpl.java
View file @
61b1528d
...
@@ -914,13 +914,22 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
...
@@ -914,13 +914,22 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
List
<
ScheduleServe
>
scheduleServeList
=
scheduleManage
.
getScheduleServeList
();
List
<
ScheduleServe
>
scheduleServeList
=
scheduleManage
.
getScheduleServeList
();
scheduleServeList
.
forEach
(
scheduleServe
->
scheduleServe
.
setSchId
(
scheduleManage
.
getId
()));
scheduleServeList
.
forEach
(
scheduleServe
->
scheduleServe
.
setSchId
(
scheduleManage
.
getId
()));
scheduleServeList
.
forEach
(
scheduleServe
->
{
if
(
scheduleServe
.
getId
()
!=
null
)
{
scheduleServeList
.
stream
()
scheduleServeMapper
.
updateById
(
scheduleServe
);
.
filter
(
scheduleServe
->
scheduleServe
.
getId
()
==
null
)
}
else
{
.
forEach
(
scheduleServeMapper:
:
insert
);
scheduleServeMapper
.
insert
(
scheduleServe
);
scheduleServeList
.
stream
()
}
.
filter
(
scheduleServe
->
scheduleServe
.
getId
()
!=
null
)
});
.
forEach
(
scheduleServeMapper:
:
updateById
);
// //数据库死锁
// scheduleServeList.forEach(scheduleServe -> {
// if (scheduleServe.getId() != null) {
// scheduleServeMapper.updateById(scheduleServe);
// } else {
// scheduleServeMapper.insert(scheduleServe);
// }
// });
List
<
Integer
>
removeIds
=
oldScheduleServeIds
.
stream
().
filter
(
id
->
!
scheduleServeList
.
stream
().
map
(
ScheduleServe:
:
getId
).
collect
(
Collectors
.
toList
()).
contains
(
id
)).
collect
(
Collectors
.
toList
());
List
<
Integer
>
removeIds
=
oldScheduleServeIds
.
stream
().
filter
(
id
->
!
scheduleServeList
.
stream
().
map
(
ScheduleServe:
:
getId
).
collect
(
Collectors
.
toList
()).
contains
(
id
)).
collect
(
Collectors
.
toList
());
if
(
ListUtil
.
isNotEmpty
(
removeIds
))
{
if
(
ListUtil
.
isNotEmpty
(
removeIds
))
{
scheduleServeMapper
.
deleteBatchIds
(
removeIds
);
scheduleServeMapper
.
deleteBatchIds
(
removeIds
);
...
...
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