Commit 87caad29 by 孙昱

sunyu::update::fix bug about createOrder

parent e240af67
...@@ -102,7 +102,6 @@ public enum ResponseResult { ...@@ -102,7 +102,6 @@ public enum ResponseResult {
SHOPPING_CART_BUY_ONE_SEND_GOODS_ERR("44033", "寄件活动商品错误"), SHOPPING_CART_BUY_ONE_SEND_GOODS_ERR("44033", "寄件活动商品错误"),
SHOPPING_CART_COUPON_MIX_NOT_EXIST("44034", "券商品不存在"), SHOPPING_CART_COUPON_MIX_NOT_EXIST("44034", "券商品不存在"),
SHOPPING_CART_QTY_LIMIT_ERR("44035", "该商品单次购买数量限制为10,请知晓"), SHOPPING_CART_QTY_LIMIT_ERR("44035", "该商品单次购买数量限制为10,请知晓"),
SHOPPING_CART_SEED_COUPON_VALID("44037","券商品数量不可大于券数量"),
SHOPPING_CART_MATERIA_QTY_LIMIT_ERR("44038", "商品加料超过最大限制"), SHOPPING_CART_MATERIA_QTY_LIMIT_ERR("44038", "商品加料超过最大限制"),
/** /**
......
...@@ -879,6 +879,8 @@ public class ShoppingCartMCoffeeServiceImpl { ...@@ -879,6 +879,8 @@ public class ShoppingCartMCoffeeServiceImpl {
// 获取购物车商品 // 获取购物车商品
List<CartGoods> cartGoodsList = assortmentSdkService.getShoppingCart(partnerId, storeId, userId, null, tableNumber, shoppingCartBaseService); List<CartGoods> cartGoodsList = assortmentSdkService.getShoppingCart(partnerId, storeId, userId, null, tableNumber, shoppingCartBaseService);
log.info("cartGoodsList: {}",JSONObject.toJSONString(cartGoodsList)); log.info("cartGoodsList: {}",JSONObject.toJSONString(cartGoodsList));
//过滤月享卡2.0虚拟商品
cartGoodsList = cartGoodsList.stream().filter(goods-> !StringUtils.equals("9999",goods.getSkuId())).collect(Collectors.toList());
if (cartGoodsList == null || CollectionUtils.isEmpty(cartGoodsList)) { if (cartGoodsList == null || CollectionUtils.isEmpty(cartGoodsList)) {
throw new ServiceException(ResponseResult.SHOPPING_CART_GETINFO_INVAILD); throw new ServiceException(ResponseResult.SHOPPING_CART_GETINFO_INVAILD);
} }
...@@ -2279,10 +2281,6 @@ public class ShoppingCartMCoffeeServiceImpl { ...@@ -2279,10 +2281,6 @@ public class ShoppingCartMCoffeeServiceImpl {
if (StringUtils.isEmpty(addShoppingCartGoodsRequestVo.getCouponCode())){ if (StringUtils.isEmpty(addShoppingCartGoodsRequestVo.getCouponCode())){
throw new ServiceException(ResponseResult.SHOPPING_CART_ADD_ERROR); throw new ServiceException(ResponseResult.SHOPPING_CART_ADD_ERROR);
} }
//加购种子券商品,购物车中必须已有月卡不可为空
if (CollectionUtils.isEmpty(oldCartGoodsList)) {
throw new ServiceException(ResponseResult.SHOPPING_CART_SEED_COUPON_VALID);
}
for (CartGoods cartGoods : oldCartGoodsList) { for (CartGoods cartGoods : oldCartGoodsList) {
//1.种子券商品券信息与月卡信息一致 //1.种子券商品券信息与月卡信息一致
if (null != cartGoods.getMonthCardInfo() && !addShoppingCartGoodsRequestVo.getCouponCode().equals(cartGoods.getMonthCardInfo().getCardCode())) { if (null != cartGoods.getMonthCardInfo() && !addShoppingCartGoodsRequestVo.getCouponCode().equals(cartGoods.getMonthCardInfo().getCardCode())) {
......
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