Commit b7344fc1 by 孙昱

Merge branch 'feature/20201125_多规格商品下添加单规格商品_yu.sun' into qa

parents 91ce7bc9 b4954e8e
...@@ -1170,7 +1170,8 @@ public class ShoppingCartMCoffeeServiceImpl { ...@@ -1170,7 +1170,8 @@ public class ShoppingCartMCoffeeServiceImpl {
allCartGoodsList.forEach(oldCartGoods -> { allCartGoodsList.forEach(oldCartGoods -> {
int index; int index;
if ((index = nowCartGoodsList.indexOf(oldCartGoods)) >= 0) { if ((index = nowCartGoodsList.indexOf(oldCartGoods)) >= 0) {
if (nowCartGoodsList.get(index).getSpuId().equals(oldCartGoods.getSpuId())){ if (nowCartGoodsList.get(index).getSpuId().equals(oldCartGoods.getSpuId())
&& nowCartGoodsList.get(index).getSkuId().equals(oldCartGoods.getSkuId())){
nowCartGoodsList.get(index).setQty(nowCartGoodsList.get(index).getQty() + addCartGoods.getQty()); nowCartGoodsList.get(index).setQty(nowCartGoodsList.get(index).getQty() + addCartGoods.getQty());
}else{ }else{
nowCartGoodsList.add(oldCartGoods); nowCartGoodsList.add(oldCartGoods);
......
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