Commit 3c57777a by yu.sun

sunyu::update::fix bug about clear monthCard info

parent 48d7f3c6
...@@ -360,10 +360,10 @@ public class ShoppingCartMCoffeeServiceImpl { ...@@ -360,10 +360,10 @@ public class ShoppingCartMCoffeeServiceImpl {
if (Objects.equals(1,goods.getIsMonthCard()) if (Objects.equals(1,goods.getIsMonthCard())
&& goods.getGoodsId().equals(updateShoppingCartGoodsQtyRequestVo.getCartGoodsUid())){ && goods.getGoodsId().equals(updateShoppingCartGoodsQtyRequestVo.getCartGoodsUid())){
if (updateShoppingCartGoodsQtyRequestVo.getQty() == 0){ if (updateShoppingCartGoodsQtyRequestVo.getQty() == 0){
for (CartGoods cartGood : cartGoodsList) { Iterator<CartGoods> cartGoodsIterator = cartGoodsList.iterator();
if (cartGood.getCouponCode().equals(goods.getMonthCardInfo().getCardCode())){ while (cartGoodsIterator.hasNext()){
cartGood.setCouponName(""); if (cartGoodsIterator.next().getCouponCode().equals(goods.getMonthCardInfo().getCardCode())){
cartGood.setCouponCode(""); cartGoodsIterator.remove();
break; break;
} }
} }
......
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