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
3d72bbd8
Commit
3d72bbd8
authored
Dec 18, 2020
by
zhiheng.zhang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/qa' into qa
parents
fc7b2033
0d523ebc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+12
-0
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
3d72bbd8
...
@@ -340,6 +340,8 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -340,6 +340,8 @@ public class ShoppingCartMCoffeeServiceImpl {
// 先验证商品是否存在
// 先验证商品是否存在
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
storeId
,
userId
,
null
,
null
,
shoppingCartBaseService
);
List
<
CartGoods
>
cartGoodsList
=
assortmentSdkService
.
getShoppingCart
(
partnerId
,
storeId
,
userId
,
null
,
null
,
shoppingCartBaseService
);
CartGoods
cartGoods
=
null
;
CartGoods
cartGoods
=
null
;
String
skuId
=
""
;
Integer
finalQty
=
qty
;
for
(
CartGoods
cartGoods_
:
cartGoodsList
)
{
for
(
CartGoods
cartGoods_
:
cartGoodsList
)
{
if
(
cartGoodsUid
.
equals
(
cartGoods_
.
getCartGoodsUid
()))
{
if
(
cartGoodsUid
.
equals
(
cartGoods_
.
getCartGoodsUid
()))
{
cartGoods
=
cartGoods_
;
cartGoods
=
cartGoods_
;
...
@@ -348,10 +350,20 @@ public class ShoppingCartMCoffeeServiceImpl {
...
@@ -348,10 +350,20 @@ public class ShoppingCartMCoffeeServiceImpl {
}
else
{
}
else
{
cartGoods_
.
setQty
(
cartGoods_
.
getQty
()
-
(
oldQty
-
qty
));
cartGoods_
.
setQty
(
cartGoods_
.
getQty
()
-
(
oldQty
-
qty
));
}
}
skuId
=
cartGoods_
.
getSkuId
();
finalQty
=
cartGoods_
.
getQty
();
break
;
break
;
}
}
}
}
if
(!
mcCafeTablewareSkuId
.
equals
(
skuId
)
&&
finalQty
==
0
&&
CollectionUtils
.
isNotEmpty
(
cartGoodsList
)
&&
cartGoodsList
.
size
()
==
2
)
{
for
(
CartGoods
cartGoods_
:
cartGoodsList
)
{
if
(
mcCafeTablewareSkuId
.
equals
(
cartGoods_
.
getSkuId
()))
{
cartGoods_
.
setQty
(
0
);
}
}
}
if
(
cartGoods
==
null
)
{
if
(
cartGoods
==
null
)
{
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_UPDATE_ERROR
);
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_UPDATE_ERROR
);
}
}
...
...
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