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
1769651e
Commit
1769651e
authored
Dec 08, 2020
by
刘鹏飞
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/feature/coco-payGift-刘鹏飞' into qa
parents
f2def697
6c912467
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
+7
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/shoppingCart/impl/CocoShoppingCartRelationServiceImpl.java
+7
-1
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/shoppingCart/impl/CocoShoppingCartRelationServiceImpl.java
View file @
1769651e
...
...
@@ -84,6 +84,7 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
List
<
CartGoods
>
halfProduct
=
new
ArrayList
<>();
products
.
forEach
(
product
->
{
// 要添加的半价行数量,该字段从促销返回
Integer
num
=
0
;
// 商品优惠的金额
Long
discountAmount
=
0L
;
...
...
@@ -108,6 +109,11 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
product
.
setAmount
(
product
.
getAmount
()
-
discountAmount
*
num
);
product
.
setOriginalAmount
(
product
.
getOriginalAmount
()
-
product
.
getOriginalPrice
()
*
num
);
product
.
setQty
(
newQty
);
// num不为0,全价行的活动类型就要设置成null
// 前端用这个字段控制能否加减
if
(!
Objects
.
equals
(
num
,
0
)){
product
.
setActivityType
(
null
);
}
newProducts
.
add
(
product
);
}
newProducts
.
addAll
(
halfProduct
);
...
...
@@ -163,7 +169,7 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
newCartGoods
.
setSkuName
(
cgs
.
getSkuName
());
newCartGoods
.
setClassificationId
(
cgs
.
getClassificationId
());
newCartGoods
.
setClassificationName
(
cgs
.
getClassificationName
());
//
newCartGoods.setActivityType(activityType);
newCartGoods
.
setActivityType
(
activityType
);
newCartGoods
.
setQty
(
qty
);
return
newCartGoods
;
...
...
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