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
5d964a5e
Commit
5d964a5e
authored
Jul 13, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
闲时折扣
parent
13162f3c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
ScheduleManageServiceImpl.java
...plication/order/serve/impl/ScheduleManageServiceImpl.java
+7
-5
No files found.
src/main/java/com/gogirl/application/order/serve/impl/ScheduleManageServiceImpl.java
View file @
5d964a5e
...
...
@@ -470,7 +470,9 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
return
bool
;
}
private
void
backLeisureDiscountConfig
(
String
date
,
ScheduleServe
scheduleServe
)
{
private
void
backLeisureDiscountConfig
(
ScheduleServe
scheduleServe
)
{
String
date
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
scheduleServe
.
getStartTime
());
if
(
scheduleServe
.
getLeisureDiscountConfigId
()
!=
null
)
{
LeisureDiscountConfigLimit
leisureDiscountConfigLimit
=
leisureDiscountConfigLimitMapper
.
selectConfigLimit
(
date
,
scheduleServe
.
getLeisureDiscountConfigId
());
if
(
leisureDiscountConfigLimit
!=
null
)
{
...
...
@@ -495,9 +497,8 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
List
<
ScheduleServe
>
scheduleServeList
=
scheduleServeMapper
.
selectList
(
new
LambdaQueryWrapper
<
ScheduleServe
>().
eq
(
ScheduleServe:
:
getSchId
,
scheduleManage
.
getId
()));
String
date
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
scheduleManage
.
getScheduledTime
()
!=
null
?
scheduleManage
.
getScheduledTime
()
:
scheduleManage
.
getArriveTime
());
scheduleServeList
.
forEach
(
scheduleServe
->
this
.
backLeisureDiscountConfig
(
date
,
scheduleServe
)
);
scheduleServeList
.
forEach
(
this
::
backLeisureDiscountConfig
);
scheduleManageMapper
.
updateById
(
scheduleManage
);
...
...
@@ -932,13 +933,14 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
}
else
{
oldScheduleServeList
=
Lists
.
newArrayList
();
}
String
date
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
scheduleManage
.
getScheduledTime
()
!=
null
?
scheduleManage
.
getScheduledTime
()
:
scheduleManage
.
getArriveTime
());
oldScheduleServeList
.
forEach
(
scheduleServe
->
this
.
backLeisureDiscountConfig
(
date
,
scheduleServe
)
);
oldScheduleServeList
.
forEach
(
this
::
backLeisureDiscountConfig
);
scheduleManage
.
getListScheduleServer
().
forEach
(
scheduleServe
->
{
if
(
scheduleServe
.
getLeisureDiscountConfigId
()
!=
null
)
{
String
date
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
).
format
(
scheduleServe
.
getStartTime
());
LeisureDiscountConfigLimit
leisureDiscountConfigLimit
=
leisureDiscountConfigLimitMapper
.
selectConfigLimit
(
date
,
scheduleServe
.
getLeisureDiscountConfigId
());
if
(
leisureDiscountConfigLimit
!=
null
)
{
leisureDiscountConfigLimit
.
setLeftTimes
(
leisureDiscountConfigLimit
.
getLeftTimes
()
-
1
);
...
...
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