Commit 9c4e5029 by 徐康

bug修复

parent 6271a64d
......@@ -155,13 +155,6 @@ public class ShoppingCartMCoffeeServiceImpl {
String spuId2 = spuId;
MCoffeeProductIdsVo vo =new MCoffeeProductIdsVo();
List<Long> productIds = new ArrayList<>();
//商品券校验
if (spuId.startsWith(CommonsConstant.COUPON_PREFIX)) {
couponCode = spuId.substring(CommonsConstant.COUPON_PREFIX.length());
vo = validCoupon(partnerId, storeId, spuId, productIds, BusinessTypeEnum.getByType(addShoppingCartGoodsRequestVo.getMenuType()).getCode());
spuId2 = vo.getSkuId();
goodsId = vo.getSkuId();
}
productIds.add(Long.parseLong(goodsId));
List<ProductBeanDTO> productBeanListSpuClass = null;
......@@ -2330,15 +2323,9 @@ public class ShoppingCartMCoffeeServiceImpl {
*/
private void seedCouponGoodsValidate(MCoffeeAddGoodsRequestVo addShoppingCartGoodsRequestVo,List<CartGoods> oldCartGoodsList){
//若加购种子券商品,则券号不可为空
if (null == addShoppingCartGoodsRequestVo.getMonthCardInfo()){
if (null == addShoppingCartGoodsRequestVo.getMonthCardInfo() || StringUtils.isBlank(addShoppingCartGoodsRequestVo.getMonthCardInfo().getCardCode())){
throw new ServiceException(ResponseResult.SHOPPING_CART_ADD_ERROR);
}
for (CartGoods cartGoods : oldCartGoodsList) {
//1.种子券商品券信息与月卡信息一致
if (null != cartGoods.getMonthCardInfo() && !addShoppingCartGoodsRequestVo.getCouponCode().equals(cartGoods.getMonthCardInfo().getCardCode())) {
throw new ServiceException(ResponseResult.SHOPPING_CART_COUPON_NOT_EXIST);
}
}
}
/**
......
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