Commit fa15efc9 by 周晓航

Merge branch 'KA-【华莱士】【半定制】一个订单多张优惠券使用场景-zxh' into qa

parents 36637cae 4568d9fa
......@@ -409,6 +409,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
}
//埋点添加购物车行为
this.buriedPointShoppingCart(addShoppingCartGoodsRequestVo, spuId, productName);
this.shoppingCartAddOrListCommonResponseHandle(shoppingCartGoodsResponseVo);
return ResponseUtil.success(shoppingCartGoodsResponseVo);
}
......@@ -870,8 +871,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
updateForPopupWindow(shoppingCartGoodsResponseVo, premiumExchangeResponseVoBaseResponse.getResult().getShowType(), chooseSendGoodList, shoppingCartInfoRequestVo.getSendGoods());
}
// 设置优惠券的使用门槛金额, 需要排除券的金额
Long useCouponThreshold = this.getUseCouponThreshold(shoppingCartGoodsResponseVo.getProducts());
shoppingCartGoodsResponseVo.setUseCouponThreshold(useCouponThreshold);
this.shoppingCartAddOrListCommonResponseHandle(shoppingCartGoodsResponseVo);
// 校验入参券是否可用
if (!checkAvailableCoupon(shoppingCartGoodsResponseVo, shoppingCartInfoRequestVo.getCouponCode())) {
return ResponseUtil.error(ResponseResult.SHOPPING_CART_COUPON_NOT_USE);
......@@ -880,6 +880,20 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
}
/**
* 加车 和list接口 公用处理方法
* @param shoppingCartGoodsResponseVo
*/
private void shoppingCartAddOrListCommonResponseHandle(ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo){
if (Objects.isNull(shoppingCartGoodsResponseVo)) {
return;
}
// 设置 使用信息
Long useCouponThreshold = this.getUseCouponThreshold(shoppingCartGoodsResponseVo.getProducts());
shoppingCartGoodsResponseVo.setUseCouponThreshold(useCouponThreshold);
}
/**
* 获取 券使用的门槛信息
* @param products
* @return
......
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