Commit 7ca170dc by yu.sun

sunyu::update::fix bug about modify virtual-product qty

parent b0d67ba2
......@@ -344,6 +344,7 @@ public class ShoppingCartMCoffeeServiceImpl {
String skuId = "";
Integer finalQty = qty;
for (CartGoods cartGoods_ : cartGoodsList) {
//如果菜单购月卡数量大于10,则不作数量修改,直接算价并返回之前购物车信息
if (Objects.equals(1,cartGoods_.getIsMonthCard())
&& cartGoods_.getCartGoodsUid().equals(updateShoppingCartGoodsQtyRequestVo.getCartGoodsUid())
&& updateShoppingCartGoodsQtyRequestVo.getQty()>10) {
......@@ -352,6 +353,13 @@ public class ShoppingCartMCoffeeServiceImpl {
setAddAndUpdateResponse(shoppingCartGoodsResponseVo,cartGoodsList,
ResponseResult.SHOPPING_CART_QTY_LIMIT_ERR.getMessage(),
ShoppingCartConstant.ADD_AND_UPDATE,null);
String freightCouponCode = assortmentSdkService.getShoppingCartCoupon(partnerId, storeId, userId, shoppingCartBaseService, SaveCouponType.FREIGHT_COUPON.getCode());
String couponCode = assortmentSdkService.getShoppingCartCoupon(partnerId, storeId, userId, shoppingCartBaseService, SaveCouponType.COUPON.getCode());
// 当couponCode不为空时,需参与价格计算
List<ActivityCalculationDiscountRequestDto.CalculationDiscountCoupon> coupons = getCoupon(couponCode, null, cartGoodsList,freightCouponCode,null);
// 促销活动的优惠金额计算
calculationService.updateShoppingCartGoodsDiscount(partnerId, storeId, userId, appId, orderType, assortmentCustomerInfoVo.isMemberPaid(), menuType, receiveId, couponCode,
cartGoodsList, coupons, new ArrayList<>(), shoppingCartGoodsResponseVo,null);
return ResponseUtil.success(shoppingCartGoodsResponseVo);
}
if (cartGoodsUid.equals(cartGoods_.getCartGoodsUid())) {
......
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