Commit 47d9bac8 by chongfu.liang

fix空指针

parent 492d3737
......@@ -135,9 +135,9 @@ public class CouponPromotionService implements IPromotionService {
} else {
couponPromotionVO = new CouponPromotionVO();
couponPromotionVO.setUserId(userLoginInfoDto.getMemberId());
couponPromotionVO.setStoreId(shoppingCartInfoRequestVo.getShopId());
couponPromotionVO.setPartnerId(shoppingCartInfoRequestVo.getPartnerId());
couponPromotionVO.setOrderType(shoppingCartInfoRequestVo.getOrderType());
couponPromotionVO.setStoreId(activityQueryDto.getStoreId());
couponPromotionVO.setPartnerId(activityQueryDto.getPartnerId());
couponPromotionVO.setOrderType(activityQueryDto.getOrderType());
}
couponService.checkValidCoupon(couponPromotionVO, validCouponCodeLis, spqIdToCartUuid, couponCode, cartGoodsList);
......
......@@ -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 {
, List<CartGoods> cartGoodsList
, ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo
, 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())) {
List<CartGoods> tmpCartGoods = cartGoodsList.parallelStream().filter(k -> (StringUtils.isNotBlank(k.getCouponCode()) || k.getCartGoodsUid()
......@@ -138,9 +138,9 @@ public class CouponSharingService {
} else {
couponPromotionVO = new CouponPromotionVO();
couponPromotionVO.setUserId(userId);
couponPromotionVO.setStoreId(shoppingCartInfoRequestVo.getShopId());
couponPromotionVO.setPartnerId(shoppingCartInfoRequestVo.getPartnerId());
couponPromotionVO.setOrderType(shoppingCartInfoRequestVo.getOrderType());
couponPromotionVO.setStoreId(storeId);
couponPromotionVO.setPartnerId(partnerId);
couponPromotionVO.setOrderType(orderType);
}
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