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
jenkins
order-group
Commits
e4de5dda
Commit
e4de5dda
authored
Dec 11, 2019
by
shuhu.hou@freemud.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取优惠券:修改套餐价格为: 套餐价+可选商品总价格
parent
ce952839
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CouponServiceImpl.java
+3
-4
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/CouponServiceImpl.java
View file @
e4de5dda
...
...
@@ -519,14 +519,13 @@ public class CouponServiceImpl implements CouponService {
}
Product
product
=
new
Product
();
product
.
setProductId
(
StringUtils
.
isEmpty
(
cartGood
.
getSkuId
())
?
cartGood
.
getSpuId
()
:
cartGood
.
getSkuId
());
// 商品价格
//
普通
商品价格
product
.
setAmount
(
Integer
.
valueOf
(
cartGood
.
getOriginalPrice
()
+
""
));
//
剔除套餐的商品
//
套餐价格为: 套餐价+可选商品总价格
if
(
ObjectUtils
.
equals
(
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
(),
cartGood
.
getGoodsType
()))
{
Long
finalPrice
=
cartGood
.
getFinalPrice
();
if
(
CollectionUtils
.
isNotEmpty
(
cartGood
.
getProductGroupList
())){
finalPrice
+=
cartGood
.
getProductGroupList
().
stream
().
mapToLong
(
group
->
group
.
get
Amount
()*
group
.
getQty
()).
sum
();
finalPrice
+=
cartGood
.
getProductGroupList
().
stream
().
mapToLong
(
group
->
group
.
get
FinalPrice
()*
group
.
getQty
()).
sum
();
}
product
.
setAmount
(
finalPrice
.
intValue
());
}
...
...
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