优惠券添加全部课程类型

This commit is contained in:
wuchunlei
2024-11-01 11:32:05 +08:00
parent ae85ae8109
commit f31342fb0a
2 changed files with 32 additions and 17 deletions

View File

@@ -257,9 +257,6 @@ public class BuyOrderController {
}
CouponEntity coupon = couponService.getById(couponHistory.getCouponId());
if (coupon != null){
if (new BigDecimal(coupon.getUseLevel()).compareTo(totalPrice)>0){
return R.error("未达到优惠券使用门槛");
}
couponHistory.setOrderId(buyOrder.getOrderId());
couponService.useCouponAmount(couponHistory);
totalPrice = totalPrice.subtract(coupon.getCouponAmount());