Commit b17b0a97 by 徐康

切换门店

parent 50e6fee5
...@@ -1053,7 +1053,7 @@ public class ShoppingCartMCoffeeServiceImpl { ...@@ -1053,7 +1053,7 @@ public class ShoppingCartMCoffeeServiceImpl {
} }
//清空商品券商品 //清空商品券商品
clearCartCouponGoods(partnerId, fromStoreId, userId, sessionId, cartGoodsList); cartGoodsList = clearCartCouponGoods(partnerId, fromStoreId, userId, sessionId, cartGoodsList);
} }
List<CartGoods> onlyCheckGoodsList = new ArrayList<>(); List<CartGoods> onlyCheckGoodsList = new ArrayList<>();
...@@ -1106,16 +1106,17 @@ public class ShoppingCartMCoffeeServiceImpl { ...@@ -1106,16 +1106,17 @@ public class ShoppingCartMCoffeeServiceImpl {
/** /**
* 清除购物车商品券 * 清除购物车商品券
*/ */
private void clearCartCouponGoods(String partnerId, String storeId, String userId, String sessionId, List<CartGoods> cartGoodsList) { private List<CartGoods> clearCartCouponGoods(String partnerId, String storeId, String userId, String sessionId, List<CartGoods> cartGoodsList) {
if (CollectionUtils.isEmpty(cartGoodsList)) { if (CollectionUtils.isEmpty(cartGoodsList)) {
return; return cartGoodsList;
} }
cartGoodsList = cartGoodsList.stream().filter(cartGoods -> cartGoodsList = cartGoodsList.stream().filter(cartGoods ->
(StringUtils.isEmpty(cartGoods.getCouponCode()) && !StringUtils.equals("9999",cartGoods.getSkuId())) (StringUtils.isEmpty(cartGoods.getCouponCode()) && !StringUtils.equals("9999",cartGoods.getSkuId()))
&& (cartGoods.getIsMonthCard() == 1 && cartGoods.getMonthCardInfo() != null) && (cartGoods.getIsMonthCard() == 1 && cartGoods.getMonthCardInfo() != null)
).collect(Collectors.toList()); ).collect(Collectors.toList());
// 重新存储门店购物车 // 重新存储门店购物车
assortmentSdkService.setShoppingCart(partnerId, storeId, userId, cartGoodsList, sessionId, "", shoppingCartBaseService); // assortmentSdkService.setShoppingCart(partnerId, storeId, userId, cartGoodsList, sessionId, "", shoppingCartBaseService);
return cartGoodsList;
} }
......
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