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
b16452e2
Commit
b16452e2
authored
Sep 30, 2020
by
huiyang.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix 月卡加减购物车
parent
a0e1e8ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+15
-2
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
b16452e2
...
@@ -1040,8 +1040,13 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1040,8 +1040,13 @@ public class ShoppingCartMCoffeeServiceImpl {
assortmentSdkService
.
setShoppingCart
(
partnerId
,
storeId
,
userId
,
cartGoodsList
,
sessionId
,
""
,
shoppingCartBaseService
);
assortmentSdkService
.
setShoppingCart
(
partnerId
,
storeId
,
userId
,
cartGoodsList
,
sessionId
,
""
,
shoppingCartBaseService
);
if
(
StringUtils
.
isNotEmpty
(
couponCode
)
&&
StringUtils
.
isNotEmpty
(
goodsId
))
{
if
(
StringUtils
.
isNotEmpty
(
couponCode
)
&&
StringUtils
.
isNotEmpty
(
goodsId
))
{
CartGoods
couponGoods
=
cartGoodsList
.
stream
().
findFirst
().
filter
(
t
->
t
.
getCouponCode
().
equals
(
couponCode
)).
get
();
CartGoods
couponGoods
=
cartGoodsList
.
stream
().
filter
(
t
->
couponCode
.
equals
(
t
.
getCouponCode
())).
findFirst
().
orElse
(
null
);
CartGoods
cartGoods
=
cartGoodsList
.
stream
().
findFirst
().
filter
(
t
->
(
t
.
getGoodsId
().
equals
(
goodsId
)
&&
(!
t
.
getCartGoodsUid
().
equals
(
couponGoods
.
getCartGoodsUid
())))).
get
();
CartGoods
cartGoods
=
new
CartGoods
();
if
(
couponGoods
!=
null
)
{
cartGoods
=
cartGoodsList
.
stream
().
filter
(
t
->
(
t
.
getGoodsId
().
equals
(
goodsId
)
&&
(!
t
.
getCartGoodsUid
().
equals
(
couponGoods
.
getCartGoodsUid
())))).
findFirst
().
orElse
(
null
);
}
else
{
cartGoods
=
cartGoodsList
.
stream
().
filter
(
t
->
(
t
.
getGoodsId
().
equals
(
goodsId
))).
findFirst
().
orElse
(
null
);
}
if
(
cartGoods
!=
null
)
{
if
(
cartGoods
!=
null
)
{
if
(
cardAddVo
.
getIsSelect
())
{
if
(
cardAddVo
.
getIsSelect
())
{
//修改购物车商品数量
//修改购物车商品数量
...
@@ -1065,6 +1070,14 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -1065,6 +1070,14 @@ public class ShoppingCartMCoffeeServiceImpl {
}
}
}
}
}
}
}
else
{
if
(
couponGoods
!=
null
)
{
//删除购物车行,因为商品券再购物车始终是一
UpdateShoppingCartGoodsQtyRequestVo
vo
=
updateCartVo
(
couponGoods
,
cardAddVo
,
false
);
updateGoodsQty
(
vo
);
MCoffeeAddGoodsRequestVo
requestVo
=
addCartVO
(
cardAddVo
,
false
);
addGoods
(
requestVo
);
}
}
}
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
storeId
,
userId
,
null
,
null
,
shoppingCartBaseService
);
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
storeId
,
userId
,
null
,
null
,
shoppingCartBaseService
);
}
}
...
...
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