Commit 1fcb6fce by xiaoer.li@freemud.com

失效的券购物车列表直接移除

parent 79eafc43
...@@ -91,14 +91,14 @@ public class CalculationSharingDiscountService { ...@@ -91,14 +91,14 @@ public class CalculationSharingDiscountService {
if (null == checkSpqInfo) { if (null == checkSpqInfo) {
cartGoodsList.remove(i); cartGoodsList.remove(i);
assortmentSdkService.setShoppingCart(partnerId, storeId, userId, cartGoodsList, null, null, this.shoppingCartBaseService); assortmentSdkService.setShoppingCart(partnerId, storeId, userId, cartGoodsList, null, null, this.shoppingCartBaseService);
//跑业务异常 商品券不存 ////跑业务异常 商品券不存
if (GoodsTypeEnum.HG_COUPON_GOODS.getGoodsType().equals(cartGoods.getGoodsType())) { //if (GoodsTypeEnum.HG_COUPON_GOODS.getGoodsType().equals(cartGoods.getGoodsType())) {
throw new ServiceException(ResponseResult.SHOPPING_CART_HG_COUPON_NOT_EXIST); // throw new ServiceException(ResponseResult.SHOPPING_CART_HG_COUPON_NOT_EXIST);
//} else {
// throw new ServiceException(ResponseResult.SHOPPING_CART_COUPON_NOT_EXIST);
//}
} else { } else {
throw new ServiceException(ResponseResult.SHOPPING_CART_COUPON_NOT_EXIST); validCouponMap.put(spqId, checkSpqInfo);
}
}
validCouponMap.put(spqId,checkSpqInfo);
cartGoods.setName(checkSpqInfo.getCouponName()); cartGoods.setName(checkSpqInfo.getCouponName());
cartGoods.setSpuName(checkSpqInfo.getCouponName()); cartGoods.setSpuName(checkSpqInfo.getCouponName());
...@@ -109,12 +109,12 @@ public class CalculationSharingDiscountService { ...@@ -109,12 +109,12 @@ public class CalculationSharingDiscountService {
coupons.add(coupon); coupons.add(coupon);
// 添加商品券代表的商品放入促销 // 添加商品券代表的商品放入促销
String goodsId = StringUtils.isNotBlank(checkSpqInfo.getSkuId()) ? checkSpqInfo.getSkuId(): checkSpqInfo.getSpuId(); String goodsId = StringUtils.isNotBlank(checkSpqInfo.getSkuId()) ? checkSpqInfo.getSkuId() : checkSpqInfo.getSpuId();
if (GoodsTypeEnum.HG_COUPON_GOODS.getGoodsType().equals(cartGoods.getGoodsType())) { if (GoodsTypeEnum.HG_COUPON_GOODS.getGoodsType().equals(cartGoods.getGoodsType())) {
this.setSpqDiscountGoods(calculationDiscountGoodsList,cartGoods,goodsId,checkSpqInfo.getPrice(),cartGoods.getSpuId()); this.setSpqDiscountGoods(calculationDiscountGoodsList, cartGoods, goodsId, checkSpqInfo.getPrice(), cartGoods.getSpuId());
} else { } else {
this.setSpqDiscountGoods(calculationDiscountGoodsList,cartGoods,goodsId,checkSpqInfo.getPrice()); this.setSpqDiscountGoods(calculationDiscountGoodsList, cartGoods, goodsId, checkSpqInfo.getPrice());
}
} }
} }
} }
......
...@@ -140,7 +140,7 @@ public class CartTest { ...@@ -140,7 +140,7 @@ public class CartTest {
/** /**
* 加价购商品 * 加价购商品
*/ */
additionSharingService.equally(getShoppingCartGoodsApportionRequestVo.getShoppingCartInfoRequestVo(), null, discountResult, getShoppingCartGoodsApportionRequestVo.getPremiumExchangeActivity()); additionSharingService.equally(getShoppingCartGoodsApportionRequestVo.getShoppingCartInfoRequestVo(), null, discountResult, getShoppingCartGoodsApportionRequestVo.getPremiumExchangeActivity(), null);
} }
@Test @Test
......
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