Commit 48d7f3c6 by yu.sun

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

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