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
9bd3e682
Commit
9bd3e682
authored
Dec 07, 2020
by
刘鹏飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加点日志
parent
c2162808
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
shopping-cart-application-service/src/main/java/cn/freemud/service/shoppingCart/impl/CocoShoppingCartRelationServiceImpl.java
+5
-4
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/shoppingCart/impl/CocoShoppingCartRelationServiceImpl.java
View file @
9bd3e682
...
@@ -71,12 +71,13 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
...
@@ -71,12 +71,13 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
}
}
oneGoodsDiscounts
.
forEach
(
discount
->
{
oneGoodsDiscounts
.
forEach
(
discount
->
{
if
(
Objects
.
equals
(
discount
.
getType
(),
ActivityTypeEnum
.
TYPE_53
.
getCode
())){
if
(
Objects
.
equals
(
discount
.
getType
(),
ActivityTypeEnum
.
TYPE_53
.
getCode
())){
goodsDiscountsMap
.
put
(
goodsDiscount
.
getCartGoodsUid
()
+
discount
.
getGoodsId
(),
discount
);
goodsDiscountsMap
.
put
(
goodsDiscount
.
getCartGoodsUid
()
+
"-"
+
discount
.
getGoodsId
(),
discount
);
}
}
});
});
});
});
ApiLog
.
info
(
"第二件半价,goodsDiscountsMap,"
,
goodsDiscountsMap
);
List
<
CartGoods
>
newProducts
=
new
ArrayList
<>();
List
<
CartGoods
>
newProducts
=
new
ArrayList
<>();
List
<
CartGoods
>
products
=
shoppingCartGoodsResponseVo
.
getProducts
();
List
<
CartGoods
>
products
=
shoppingCartGoodsResponseVo
.
getProducts
();
...
@@ -84,13 +85,13 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
...
@@ -84,13 +85,13 @@ public class CocoShoppingCartRelationServiceImpl implements ShoppingCartRelation
if
(
products
==
null
||
products
.
isEmpty
()){
if
(
products
==
null
||
products
.
isEmpty
()){
return
;
return
;
}
}
ApiLog
.
info
(
"第二件半价,products,"
,
products
);
products
.
forEach
(
product
->
{
products
.
forEach
(
product
->
{
Integer
num
=
0
;
Integer
num
=
0
;
// 商品优惠的金额
// 商品优惠的金额
Long
discountAmount
=
0L
;
Long
discountAmount
=
0L
;
if
(
goodsDiscountsMap
.
get
(
product
.
getCartGoodsUid
()
+
product
.
getGoodsId
())
!=
null
){
if
(
goodsDiscountsMap
.
get
(
product
.
getCartGoodsUid
()
+
"-"
+
product
.
getGoodsId
())
!=
null
){
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
GoodsDiscount
discount
=
goodsDiscountsMap
.
get
(
product
.
getCartGoodsUid
()
+
product
.
getGoodsId
());
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
GoodsDiscount
discount
=
goodsDiscountsMap
.
get
(
product
.
getCartGoodsUid
()
+
"-"
+
product
.
getGoodsId
());
if
(
discount
==
null
){
if
(
discount
==
null
){
return
;
return
;
}
}
...
...
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