Commit b252cf2b authored by Junling Bu's avatar Junling Bu
Browse files

fix[litemall-wx-api]: 下单时存在传递不合适的优惠券的情况,此时后端自动选择合适的优惠券。

parent 74396eb7
......@@ -466,11 +466,14 @@ public class WxCartController {
}
else {
LitemallCoupon coupon = couponVerifyService.checkCoupon(userId, couponId, checkedGoodsPrice);
// 用户选择的优惠券有问题
// 用户选择的优惠券有问题,则选择合适优惠券,否则使用用户选择的优惠券
if(coupon == null){
return ResponseUtil.badArgumentValue();
couponPrice = tmpCouponPrice;
couponId = tmpCouponId;
}
else {
couponPrice = coupon.getDiscount();
}
couponPrice = coupon.getDiscount();
}
// 根据订单商品总价计算运费,满88则免运费,否则8元;
......
Supports Markdown
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