Commit cee25742 by 徐康

早餐非常搭 bugfix

parent 52514e5a
......@@ -901,11 +901,6 @@ public class ShoppingCartMCoffeeServiceImpl {
List<CartGoods> nowCartGoodsList = new ArrayList<>();
//判断当前商品在购物车是否已存在,存在则数量+1,不存在商品行 + 1
allCartGoodsList.forEach(oldCartGoods -> {
if(oldCartGoods.getSpuId().equals(addCartGoods.getSpuId())) {
oldCartGoods.setSpuName(addCartGoods.getSpuName());
oldCartGoods.setSkuName(addCartGoods.getSpuName());
oldCartGoods.setName(addCartGoods.getName());
}
int index;
if ((index = nowCartGoodsList.indexOf(oldCartGoods)) >= 0) {
nowCartGoodsList.get(index).setQty(nowCartGoodsList.get(index).getQty() + addCartGoods.getQty());
......
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