From 28e043004356b5b0d40259a4231f3536e25f15af Mon Sep 17 00:00:00 2001 From: ctexthuang Date: Thu, 20 Mar 2025 16:41:35 +0800 Subject: [PATCH] feat : config --- app/Service/ServiceTrait/Api/OrderTrait.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Service/ServiceTrait/Api/OrderTrait.php b/app/Service/ServiceTrait/Api/OrderTrait.php index dca651e..c1fff70 100644 --- a/app/Service/ServiceTrait/Api/OrderTrait.php +++ b/app/Service/ServiceTrait/Api/OrderTrait.php @@ -375,7 +375,7 @@ trait OrderTrait { if ($this->couponId <= 0) return; - $couponInfo = $this->userCouponModel->where('coupon_id', $this->couponId)->where('user_id',$this->userId)->first(); + $couponInfo = $this->userCouponModel->where('id', $this->couponId)->where('user_id',$this->userId)->first(); if (empty($couponInfo)) throw new ErrException('优惠券信息错误'); if (in_array($couponInfo->status,[CouponCode::COUPON_STATUS_USED,CouponCode::COUPON_STATUS_EXPIRE])) throw new ErrException('优惠券已经被使用');