Commit 01ef9e72 by 孙昱

sunyu::update::fix bug about createOrder Error

parent 202eaa43
...@@ -175,7 +175,7 @@ public class ShoppingCartMCoffeeServiceImpl { ...@@ -175,7 +175,7 @@ public class ShoppingCartMCoffeeServiceImpl {
} }
//种子券商品信息校验 //种子券商品信息校验
if (addShoppingCartGoodsRequestVo.getIsMonthCard()< 1 && addShoppingCartGoodsRequestVo.getIsMonthCardGoods() > 0) { if (1 == addShoppingCartGoodsRequestVo.getIsMonthCard()) {
seedCouponGoodsValidate(addShoppingCartGoodsRequestVo, oldCartGoodsList); seedCouponGoodsValidate(addShoppingCartGoodsRequestVo, oldCartGoodsList);
} }
...@@ -878,8 +878,6 @@ public class ShoppingCartMCoffeeServiceImpl { ...@@ -878,8 +878,6 @@ 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);
} }
...@@ -908,8 +906,6 @@ public class ShoppingCartMCoffeeServiceImpl { ...@@ -908,8 +906,6 @@ public class ShoppingCartMCoffeeServiceImpl {
if (CollectionUtils.isNotEmpty(reduceGoods)) { if (CollectionUtils.isNotEmpty(reduceGoods)) {
allCartGoodsList.addAll(reduceGoods); allCartGoodsList.addAll(reduceGoods);
} }
//恢复套餐商品空键位
// checkNewCartGoods(allCartGoodsList,2,map);
// 重新存储最新购物车 // 重新存储最新购物车
assortmentSdkService.setShoppingCart(partnerId, storeId, userId, cartGoodsList, sessionId, tableNumber, shoppingCartBaseService); assortmentSdkService.setShoppingCart(partnerId, storeId, userId, cartGoodsList, sessionId, tableNumber, shoppingCartBaseService);
...@@ -931,12 +927,13 @@ public class ShoppingCartMCoffeeServiceImpl { ...@@ -931,12 +927,13 @@ public class ShoppingCartMCoffeeServiceImpl {
//加价购商品 //加价购商品
List<ShoppingCartInfoRequestVo.SendGoods> sendGoodsList = shoppingCartInfoRequestVo.getSendGoods(); List<ShoppingCartInfoRequestVo.SendGoods> sendGoodsList = shoppingCartInfoRequestVo.getSendGoods();
// //加价购商品组装
// packgeAdditional(shoppingCartInfoRequestVo, premiumExchangeActivity);
// 促销活动的优惠金额计算 // 促销活动的优惠金额计算
ActivityCalculationDiscountResponseDto.CalculationDiscountResult calculationDiscount = calculationService.updateShoppingCartGoodsDiscount(partnerId, storeId, userId, appId, orderType, assortmentCustomerInfoVo.isMemberPaid(), menuType, receiveId, null, ActivityCalculationDiscountResponseDto.CalculationDiscountResult calculationDiscount = calculationService.updateShoppingCartGoodsDiscount(partnerId, storeId, userId, appId, orderType, assortmentCustomerInfoVo.isMemberPaid(), menuType, receiveId, null,
cartGoodsList, coupons, sendGoodsList, shoppingCartGoodsResponseVo, payCardPrice); cartGoodsList, coupons, sendGoodsList, shoppingCartGoodsResponseVo, payCardPrice);
//过滤月享卡2.0虚拟商品
cartGoodsList = cartGoodsList.stream().filter(goods-> !StringUtils.equals("9999",goods.getSkuId())).collect(Collectors.toList());
//设置更新响应信息 //设置更新响应信息
setAddAndUpdateResponse(shoppingCartGoodsResponseVo, cartGoodsList, shoppingCartGoodsResponseVo.getToastMsg(), ShoppingCartConstant.QUERY_INFO, shoppingCartInfoRequestVo); setAddAndUpdateResponse(shoppingCartGoodsResponseVo, cartGoodsList, shoppingCartGoodsResponseVo.getToastMsg(), ShoppingCartConstant.QUERY_INFO, shoppingCartInfoRequestVo);
...@@ -1828,7 +1825,7 @@ public class ShoppingCartMCoffeeServiceImpl { ...@@ -1828,7 +1825,7 @@ public class ShoppingCartMCoffeeServiceImpl {
ShoppingCartGoodsBaseResponseVo shoppingCartGoodsResponseVo, List<CartGoods> cartGoodsList) { ShoppingCartGoodsBaseResponseVo shoppingCartGoodsResponseVo, List<CartGoods> cartGoodsList) {
//筛选数量不为0商品 //筛选数量不为0商品
cartGoodsList = cartGoodsList.stream().filter(cartGoods -> cartGoods.getQty() != 0).collect(Collectors.toList()); cartGoodsList = cartGoodsList.stream().filter(cartGoods -> cartGoods.getQty() != 0 && StringUtils.equals("9999",cartGoods.getSkuId())).collect(Collectors.toList());
//筛选非加购商品--加价购商品不校验是否在菜单,不调用validateShopProduct //筛选非加购商品--加价购商品不校验是否在菜单,不调用validateShopProduct
List<CartGoods> checkGoods = cartGoodsList.stream().filter(cartGoods -> cartGoods.getGoodsType() != GoodsTypeEnum.REDUCE_PRICE_GOODS.getGoodsType()).collect(Collectors.toList()); List<CartGoods> checkGoods = cartGoodsList.stream().filter(cartGoods -> cartGoods.getGoodsType() != GoodsTypeEnum.REDUCE_PRICE_GOODS.getGoodsType()).collect(Collectors.toList());
......
...@@ -247,7 +247,7 @@ public class CalculationServiceImpl { ...@@ -247,7 +247,7 @@ public class CalculationServiceImpl {
} }
} }
List<ShoppingCartGoodsDto.CartGoodsDetailDto> products = shoppingCartGoodsDto.getProducts(); List<ShoppingCartGoodsDto.CartGoodsDetailDto> products = shoppingCartGoodsDto.getProducts().stream().filter(p-> !StringUtils.equals("9999",p.getSkuId())).collect(Collectors.toList());
List<String> productIds = products.stream().map(t -> t.getSkuId()).collect(Collectors.toList()); List<String> productIds = products.stream().map(t -> t.getSkuId()).collect(Collectors.toList());
//调用商品的接口获取商品键位 //调用商品的接口获取商品键位
......
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