Commit bcdcc9bc by 徐康

餐具商品bug修复

parent a3bf7fec
...@@ -397,6 +397,21 @@ public class ShoppingCartMCoffeeServiceImpl { ...@@ -397,6 +397,21 @@ public class ShoppingCartMCoffeeServiceImpl {
if (CollectionUtils.isNotEmpty(cartGoodsList)) { if (CollectionUtils.isNotEmpty(cartGoodsList)) {
// check购物车中所有商品 // check购物车中所有商品
cartGoodsList = checkCartGoods(partnerId, storeId, orderType, menuType, shoppingCartGoodsResponseVo, cartGoodsList); cartGoodsList = checkCartGoods(partnerId, storeId, orderType, menuType, shoppingCartGoodsResponseVo, cartGoodsList);
//如果是餐具商品,则放到最后
if (CollectionUtils.isNotEmpty(cartGoodsList)) {
int size = cartGoodsList.size();
for(int i=0;i<size;i++) {
if(cartGoodsList.get(i).getSkuId().equals(mcCafeTablewareSkuId)) {
CartGoods cartGoods = cartGoodsList.get(i);
cartGoods.setIsTableware(true);
if(i != size-1) {
cartGoodsList.remove(i);
cartGoodsList.add(cartGoods);
break;
}
}
}
}
// 重新存储最新购物车 // 重新存储最新购物车
assortmentSdkService.setShoppingCart(partnerId, storeId, userId, cartGoodsList, sessionId, "", shoppingCartBaseService); assortmentSdkService.setShoppingCart(partnerId, storeId, userId, cartGoodsList, sessionId, "", shoppingCartBaseService);
} }
...@@ -1438,8 +1453,6 @@ public class ShoppingCartMCoffeeServiceImpl { ...@@ -1438,8 +1453,6 @@ public class ShoppingCartMCoffeeServiceImpl {
} }
} }
log.info(JSON.toJSONString(allCartGoodsList));
return allCartGoodsList; return allCartGoodsList;
} }
......
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