Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
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
pseer
gxpt_ht
Commits
174fbcaa
Commit
174fbcaa
authored
May 17, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改最优优惠券排序
parent
014d8b01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
SConsumerCouponServiceImpl.java
...share/system/service/impl/SConsumerCouponServiceImpl.java
+4
-3
No files found.
share-system/src/main/java/share/system/service/impl/SConsumerCouponServiceImpl.java
View file @
174fbcaa
...
...
@@ -240,9 +240,9 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
}
}
}
else
{
byId
=
null
;
roomLabel
=
null
;
if
(!
ObjectUtils
.
isEmpty
(
couponRequest
.
getPackageId
()))
{
byId
=
packService
.
getById
(
couponRequest
.
getPackageId
());
payPrice
=
computeTotalPrice
(
couponRequest
.
getPackageId
(),
totalPrice
);
couponRequest
.
setOrderMode
(
BuyTypeEnum
.
PACK
.
getCode
());
}
else
{
...
...
@@ -258,6 +258,7 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
List
<
SPack
>
sPacks
=
packService
.
list
();
//迭代
BigDecimal
finalPayPrice
=
payPrice
;
SPack
finalById
=
byId
;
sConsumerCoupons
.
forEach
(
item
->
{
checkCoupon
(
item
,
couponRequest
,
sStores
,
sRooms
,
sPacks
,
timeLong
);
SConsumerCouponVo
vo
=
new
SConsumerCouponVo
();
...
...
@@ -274,8 +275,8 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
if
(!
ObjectUtils
.
isEmpty
(
roomLabel
))
{
vo
.
setBalance
((
roomLabel
.
getPromotionAmount
().
subtract
(
vo
.
getSalePrice
())).
add
(((
DateUtils
.
differentHour
(
couponRequest
.
getPreStartDate
(),
couponRequest
.
getPreEndDate
()).
subtract
(
new
BigDecimal
(
roomLabel
.
getPromotionDuration
()))).
multiply
(
room
.
getPrice
()))).
abs
());
}
else
if
(!
ObjectUtils
.
isEmpty
(
b
yId
))
{
vo
.
setBalance
(
b
yId
.
getPrice
().
subtract
(
vo
.
getSalePrice
()));
}
else
if
(!
ObjectUtils
.
isEmpty
(
finalB
yId
))
{
vo
.
setBalance
(
finalB
yId
.
getPrice
().
subtract
(
vo
.
getSalePrice
()));
}
}
else
{
vo
.
setBalance
(
new
BigDecimal
(
"999"
));
...
...
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