Commit 5fa06c84 by 周晓航

调用可选优惠券 计算 配送券是否可用

Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent 5c9ea1e5
...@@ -484,6 +484,7 @@ public class CouponServiceImpl implements CouponService { ...@@ -484,6 +484,7 @@ public class CouponServiceImpl implements CouponService {
couponCodes.add(memberCoupon.getCouponCode()); couponCodes.add(memberCoupon.getCouponCode());
} }
}); });
// fisherman 构建可选优惠券
Integer freightAmount = null; Integer freightAmount = null;
if (couponPromotionVO !=null) { if (couponPromotionVO !=null) {
Long deliveryAmount = couponPromotionVO.getDeliveryAmount(); Long deliveryAmount = couponPromotionVO.getDeliveryAmount();
......
...@@ -679,6 +679,8 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -679,6 +679,8 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
ActivityQueryDto activityQueryDto = activityAdapter.getActivityQueryDto(partnerId, storeId, userId, appId, shoppingCartInfoRequestVo.getOrderType()); ActivityQueryDto activityQueryDto = activityAdapter.getActivityQueryDto(partnerId, storeId, userId, appId, shoppingCartInfoRequestVo.getOrderType());
CouponPromotionVO couponPromotionVO = couponAdapter.getCouponPromotionVO(shoppingCartInfoRequestVo, userLoginInfoDto); CouponPromotionVO couponPromotionVO = couponAdapter.getCouponPromotionVO(shoppingCartInfoRequestVo, userLoginInfoDto);
// fisherman 作用: 调用可选优惠券 计算 配送券是否可用
couponPromotionVO.setDeliveryAmount(deliveryAmount);
if (grayPush(partnerId,storeId,"2")) { if (grayPush(partnerId,storeId,"2")) {
ArrayList<CalculationSharingDiscountRequestDto.CalculationDiscountCoupon> coupons = new ArrayList<>(); ArrayList<CalculationSharingDiscountRequestDto.CalculationDiscountCoupon> coupons = new ArrayList<>();
if (StringUtils.isNotEmpty(couponCode)) { if (StringUtils.isNotEmpty(couponCode)) {
...@@ -1702,9 +1704,6 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -1702,9 +1704,6 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
LogUtil.info("fisherman 促销活动计算价格 03",JSON.toJSONString(shoppingCartGoodsResponseVo), JSON.toJSONString(shoppingCartInfoRequestVo)); LogUtil.info("fisherman 促销活动计算价格 03",JSON.toJSONString(shoppingCartGoodsResponseVo), JSON.toJSONString(shoppingCartInfoRequestVo));
LogUtil.info("fisherman 促销活动计算价格 04",JSON.toJSONString(userLoginInfoDto), JSON.toJSONString(deliveryAmount)); LogUtil.info("fisherman 促销活动计算价格 04",JSON.toJSONString(userLoginInfoDto), JSON.toJSONString(deliveryAmount));
if (couponPromotionVO !=null) {
couponPromotionVO.setDeliveryAmount(deliveryAmount);
}
//默认计算优惠 设置包装费 原价 现价 优惠金额 //默认计算优惠 设置包装费 原价 现价 优惠金额
DefaultPromotionService defaultPromotionService = (DefaultPromotionService) PromotionFactory.getPromotionService(ShoppingCartPromotionEnum.DEFAULT_PROMOTION); DefaultPromotionService defaultPromotionService = (DefaultPromotionService) PromotionFactory.getPromotionService(ShoppingCartPromotionEnum.DEFAULT_PROMOTION);
defaultPromotionService.updateShoppingCartGoodsDiscount(couponPromotionVO, activityQueryDto, calculationDiscountResult, cartGoodsList, shoppingCartGoodsResponseVo, userLoginInfoDto, shoppingCartInfoRequestVo); defaultPromotionService.updateShoppingCartGoodsDiscount(couponPromotionVO, activityQueryDto, calculationDiscountResult, cartGoodsList, shoppingCartGoodsResponseVo, userLoginInfoDto, shoppingCartInfoRequestVo);
......
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