Commit ee395ab8 by 徐康

Merge branch 'feature/20201209_xukang_麦咖啡p4v2' into qa

# Conflicts:
#	shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
parents fdd128ef 4c96ccb3
......@@ -340,6 +340,7 @@ public class ShoppingCartMCoffeeServiceImpl {
// 先验证商品是否存在
List<CartGoods> cartGoodsList = assortmentSdkService.getShoppingCart(partnerId, storeId, userId, null, null, shoppingCartBaseService);
CartGoods cartGoods = null;
String skuId = "";
for (CartGoods cartGoods_ : cartGoodsList) {
if (cartGoodsUid.equals(cartGoods_.getCartGoodsUid())) {
cartGoods = cartGoods_;
......@@ -348,10 +349,19 @@ public class ShoppingCartMCoffeeServiceImpl {
}else {
cartGoods_.setQty(cartGoods_.getQty() - (oldQty - qty));
}
skuId = cartGoods_.getSkuId();
break;
}
}
if(!mcCafeTablewareSkuId.equals(skuId) && qty == 0 && CollectionUtils.isNotEmpty(cartGoodsList) && cartGoodsList.size() == 2) {
for (CartGoods cartGoods_ : cartGoodsList) {
if(mcCafeTablewareSkuId.equals(cartGoods_.getSkuId())) {
cartGoods_.setQty(0);
}
}
}
if (cartGoods == null) {
throw new ServiceException(ResponseResult.SHOPPING_CART_UPDATE_ERROR);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment