Commit a36f0ebb by 徐康

早餐非常搭 bugfix

parent 27f8a739
......@@ -883,11 +883,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