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
4b045e8b
Commit
4b045e8b
authored
Aug 14, 2020
by
xiaoer.li@freemud.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代金券增加小料金额
parent
6da4bb30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CouponServiceImpl.java
+8
-3
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CouponServiceImpl.java
View file @
4b045e8b
...
@@ -540,15 +540,20 @@ public class CouponServiceImpl implements CouponService {
...
@@ -540,15 +540,20 @@ public class CouponServiceImpl implements CouponService {
// 套餐价格为: 套餐价+可选商品总价格
// 套餐价格为: 套餐价+可选商品总价格
if
(
ObjectUtils
.
equals
(
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
(),
cartGood
.
getGoodsType
()))
{
if
(
ObjectUtils
.
equals
(
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
(),
cartGood
.
getGoodsType
()))
{
Long
finalPrice
=
cartGood
.
getFinalPrice
();
Long
finalPrice
=
cartGood
.
getFinalPrice
();
if
(
CollectionUtils
.
isNotEmpty
(
cartGood
.
getProductGroupList
())){
if
(
CollectionUtils
.
isNotEmpty
(
cartGood
.
getProductGroupList
()))
{
finalPrice
+=
cartGood
.
getProductGroupList
().
stream
().
mapToLong
(
group
->
group
.
getFinalPrice
()*
group
.
getQty
()).
sum
();
finalPrice
+=
cartGood
.
getProductGroupList
().
stream
().
mapToLong
(
group
->
group
.
getFinalPrice
()
*
group
.
getQty
()).
sum
();
}
}
product
.
setAmount
(
finalPrice
.
intValue
());
product
.
setAmount
(
finalPrice
.
intValue
());
}
}
// 数量
// 数量
product
.
setQuantity
(
cartGood
.
getQty
());
product
.
setQuantity
(
cartGood
.
getQty
());
productList
.
add
(
product
);
productList
.
add
(
product
);
totalAmount
=
totalAmount
+
product
.
getAmount
()
*
cartGood
.
getQty
();
totalAmount
=
totalAmount
+
product
.
getAmount
()
*
cartGood
.
getQty
();
if
(
CollectionUtils
.
isNotEmpty
(
cartGood
.
getProductMaterialList
()))
{
for
(
CartGoods
.
MaterialGoods
materialGoods
:
cartGood
.
getProductMaterialList
())
{
totalAmount
=
totalAmount
+
materialGoods
.
getAmount
();
}
}
}
}
return
totalAmount
;
return
totalAmount
;
}
}
...
...
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