feat : coupon

This commit is contained in:
2025-03-20 17:52:09 +08:00
parent 82d4ac5666
commit 3cf870d1f7

View File

@@ -385,7 +385,7 @@ trait OrderTrait
if (in_array($couponInfo->status,[CouponCode::COUPON_STATUS_USED,CouponCode::COUPON_STATUS_EXPIRE])) throw new ErrException('优惠券已经被使用'); if (in_array($couponInfo->status,[CouponCode::COUPON_STATUS_USED,CouponCode::COUPON_STATUS_EXPIRE])) throw new ErrException('优惠券已经被使用');
$couponTemplateInfo = $this->couponTemplateModel->getInfoById($couponInfo->coupon_template_id); $couponTemplateInfo = $this->couponTemplateModel->getInfoById($couponInfo->coupon_template_id);
if (empty($couponTempleteInfo)) throw new ErrException('优惠券信息错误'); if (empty($couponTemplateInfo)) throw new ErrException('优惠券信息错误');
$this->couponId = $couponInfo->id; $this->couponId = $couponInfo->id;
$this->orderRes['coupon_info'] = [ $this->orderRes['coupon_info'] = [