Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
44613cb9
Commit
44613cb9
authored
Mar 11, 2021
by
chongfu.liang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券问题
parent
b479a63e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/PlatformListCartGoodsService.java
+8
-8
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/demo/service/impl/PlatformListCartGoodsService.java
View file @
44613cb9
...
@@ -211,16 +211,16 @@ public class PlatformListCartGoodsService extends AbstractListCartGoodsService {
...
@@ -211,16 +211,16 @@ public class PlatformListCartGoodsService extends AbstractListCartGoodsService {
discountResult
=
calCostBO
.
getCalculationDiscountBO
().
getResult
();
discountResult
=
calCostBO
.
getCalculationDiscountBO
().
getResult
();
}
}
// 当couponCode不为空时,需计算优惠价格 3代金 31折扣 32商品 33换购券
// 当couponCode不为空时,需计算优惠价格 3代金 31折扣 32商品 33换购券
// 当couponCode不为空时,需计算优惠价格
// 当couponCode不为空时,需计算优惠价格
3代金 31折扣 32商品 33换购券
long
couponDiscount
=
0
;
long
couponDiscount
=
0
;
if
(
couponPromotionVO
!=
null
&&
StringUtils
.
isNotEmpty
(
couponPromotionVO
.
getCouponCode
())
if
(
couponPromotionVO
!=
null
&&
StringUtils
.
isNotEmpty
(
couponPromotionVO
.
getCouponCode
())
&&
calCostBO
.
getCalculationDiscountBO
()
!=
null
&&
calCostBO
.
getCalculationDiscountBO
().
getResult
()
!=
null
)
{
&&
calCostBO
.
getCalculationDiscountBO
()
!=
null
&&
calCostBO
.
getCalculationDiscountBO
().
getResult
()
!=
null
List
<
CalculationDiscountBO
.
CalculationDiscountResult
.
CouponResults
>
couponDiscounts
=
calCostBO
.
getCalculationDiscountBO
().
getResult
().
getCouponDiscounts
();
&&
calCostBO
.
getCalculationDiscountBO
().
getResult
().
getDiscounts
()
!=
null
)
{
if
(
CollectionUtils
.
isNotEmpty
(
couponDiscounts
))
{
List
<
Integer
>
asList
=
Arrays
.
asList
(
3
,
31
);
for
(
CalculationDiscountBO
.
CalculationDiscountResult
.
CouponResults
couponResults
:
couponDiscounts
)
{
List
<
CalculationDiscountBO
.
CalculationDiscountResult
.
Discount
>
couponDiscounts
=
calCostBO
.
getCalculationDiscountBO
().
getResult
().
getDiscounts
();
couponDiscount
=
couponDiscount
+
(
couponResults
.
getDiscountAmount
()
==
null
?
0
:
couponResults
.
getDiscountAmount
()
);
CalculationDiscountBO
.
CalculationDiscountResult
.
Discount
first
=
couponDiscounts
.
stream
().
filter
(
d
->
asList
.
contains
(
d
.
getType
())).
findFirst
().
orElse
(
null
);
}
if
(
first
!=
null
)
couponDiscount
=
first
.
getDiscount
().
longValue
();
}
}
}
shoppingCartGoodsBO
.
setCouponDiscount
(
couponDiscount
);
shoppingCartGoodsBO
.
setCouponDiscount
(
couponDiscount
);
//循环购物车商品券
//循环购物车商品券
...
...
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