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
a502a24f
Commit
a502a24f
authored
Jun 24, 2021
by
周晓航
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新算价 优惠总金额需要加上配送券的 优惠金额
Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent
f43fbba8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletions
+15
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationCommonService.java
+15
-1
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationCommonService.java
View file @
a502a24f
...
@@ -98,7 +98,21 @@ public class CalculationCommonService {
...
@@ -98,7 +98,21 @@ public class CalculationCommonService {
shoppingCartGoodsResponseVo
.
setOriginalTotalAmount
(
discountResult
==
null
?
totalOriginalAmount
:
discountResult
.
getOriginalTotalAmount
());
shoppingCartGoodsResponseVo
.
setOriginalTotalAmount
(
discountResult
==
null
?
totalOriginalAmount
:
discountResult
.
getOriginalTotalAmount
());
shoppingCartGoodsResponseVo
.
setTotalAmount
(
discountResult
==
null
?
totalAmount
:
discountResult
.
getTotalAmount
());
shoppingCartGoodsResponseVo
.
setTotalAmount
(
discountResult
==
null
?
totalAmount
:
discountResult
.
getTotalAmount
());
shoppingCartGoodsResponseVo
.
setNewPackAmount
(
totalPackageAmount
);
shoppingCartGoodsResponseVo
.
setNewPackAmount
(
totalPackageAmount
);
shoppingCartGoodsResponseVo
.
setTotalDiscountAmount
(
discountResult
==
null
?
0L
:
discountResult
.
getTotalDiscountAmount
());
// fisehrman 总优惠金额 需要+配送券的优惠金额
if
(
discountResult
==
null
)
{
shoppingCartGoodsResponseVo
.
setTotalDiscountAmount
(
0L
);
}
else
{
// 需要算上配送券的优惠金额
Integer
discountAmount
=
0
;
if
(
CollectionUtils
.
isNotEmpty
(
discountResult
.
getDiscounts
()))
{
// 过滤出配送券金额
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Discount
discount
=
discountResult
.
getDiscounts
().
stream
().
filter
(
c
->
c
.
getType
()
!=
null
&&
c
.
getType
().
compareTo
(
ActivityTypeEnum
.
TYPE_34
.
getCode
())
==
0
).
findFirst
().
orElse
(
null
);
if
(
discount
!=
null
)
{
discountAmount
=
discount
.
getDiscount
();
}
}
shoppingCartGoodsResponseVo
.
setTotalDiscountAmount
(
discountResult
.
getTotalDiscountAmount
()
+
discountAmount
);
}
}
}
private
void
rowRealAmount
(
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
>
goods
,
CartGoods
cartGoods
,
String
couponCode
)
{
private
void
rowRealAmount
(
List
<
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
>
goods
,
CartGoods
cartGoods
,
String
couponCode
)
{
...
...
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