fix[litemall-wx-api]: 下单时存在传递不合适的优惠券的情况,此时后端自动选择合适的优惠券。
This commit is contained in:
@@ -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元;
|
||||
|
||||
Reference in New Issue
Block a user