Commit 47d9bac8 by chongfu.liang

fix空指针

parent 492d3737
...@@ -135,9 +135,9 @@ public class CouponPromotionService implements IPromotionService { ...@@ -135,9 +135,9 @@ public class CouponPromotionService implements IPromotionService {
} else { } else {
couponPromotionVO = new CouponPromotionVO(); couponPromotionVO = new CouponPromotionVO();
couponPromotionVO.setUserId(userLoginInfoDto.getMemberId()); couponPromotionVO.setUserId(userLoginInfoDto.getMemberId());
couponPromotionVO.setStoreId(shoppingCartInfoRequestVo.getShopId()); couponPromotionVO.setStoreId(activityQueryDto.getStoreId());
couponPromotionVO.setPartnerId(shoppingCartInfoRequestVo.getPartnerId()); couponPromotionVO.setPartnerId(activityQueryDto.getPartnerId());
couponPromotionVO.setOrderType(shoppingCartInfoRequestVo.getOrderType()); couponPromotionVO.setOrderType(activityQueryDto.getOrderType());
} }
couponService.checkValidCoupon(couponPromotionVO, validCouponCodeLis, spqIdToCartUuid, couponCode, cartGoodsList); couponService.checkValidCoupon(couponPromotionVO, validCouponCodeLis, spqIdToCartUuid, couponCode, cartGoodsList);
......
...@@ -81,7 +81,7 @@ public class CalculationSharingCartService { ...@@ -81,7 +81,7 @@ public class CalculationSharingCartService {
/** /**
* 可用券及券折扣 * 可用券及券折扣
*/ */
promotionSharingService.updateShoppingCartGoodsDiscount(discountResult, cartGoodsList, shoppingCartGoodsResponseVo, couponPromotionVO,shoppingCartInfoRequestVo, userId, partnerId, storeId); promotionSharingService.updateShoppingCartGoodsDiscount(discountResult, cartGoodsList, shoppingCartGoodsResponseVo, couponPromotionVO,shoppingCartInfoRequestVo, userId, partnerId, storeId, activityQueryDto.getOrderType());
/** /**
* 满减处理 * 满减处理
......
...@@ -56,7 +56,7 @@ public class CouponSharingService { ...@@ -56,7 +56,7 @@ public class CouponSharingService {
, List<CartGoods> cartGoodsList , List<CartGoods> cartGoodsList
, ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo , ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo
, CouponPromotionVO couponPromotionVO , CouponPromotionVO couponPromotionVO
,ShoppingCartInfoRequestVo shoppingCartInfoRequestVo, String userId, String partnerId, String storeId) { ,ShoppingCartInfoRequestVo shoppingCartInfoRequestVo, String userId, String partnerId, String storeId, Integer orderType) {
// 用户选择了查询优惠券信息 // 用户选择了查询优惠券信息
if (couponPromotionVO != null && ObjectUtils.equals(CouponFlag.YES.getCode(), couponPromotionVO.getFlg())) { if (couponPromotionVO != null && ObjectUtils.equals(CouponFlag.YES.getCode(), couponPromotionVO.getFlg())) {
List<CartGoods> tmpCartGoods = cartGoodsList.parallelStream().filter(k -> (StringUtils.isNotBlank(k.getCouponCode()) || k.getCartGoodsUid() List<CartGoods> tmpCartGoods = cartGoodsList.parallelStream().filter(k -> (StringUtils.isNotBlank(k.getCouponCode()) || k.getCartGoodsUid()
...@@ -138,9 +138,9 @@ public class CouponSharingService { ...@@ -138,9 +138,9 @@ public class CouponSharingService {
} else { } else {
couponPromotionVO = new CouponPromotionVO(); couponPromotionVO = new CouponPromotionVO();
couponPromotionVO.setUserId(userId); couponPromotionVO.setUserId(userId);
couponPromotionVO.setStoreId(shoppingCartInfoRequestVo.getShopId()); couponPromotionVO.setStoreId(storeId);
couponPromotionVO.setPartnerId(shoppingCartInfoRequestVo.getPartnerId()); couponPromotionVO.setPartnerId(partnerId);
couponPromotionVO.setOrderType(shoppingCartInfoRequestVo.getOrderType()); couponPromotionVO.setOrderType(orderType);
} }
couponService.checkValidCoupon(couponPromotionVO, validCouponCodeLis, spqIdToCartUuid, couponCode, cartGoodsList); couponService.checkValidCoupon(couponPromotionVO, validCouponCodeLis, spqIdToCartUuid, couponCode, cartGoodsList);
......
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