feat : config
This commit is contained in:
@@ -375,7 +375,7 @@ trait OrderTrait
|
|||||||
{
|
{
|
||||||
if ($this->couponId <= 0) return;
|
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 (empty($couponInfo)) throw new ErrException('优惠券信息错误');
|
||||||
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('优惠券已经被使用');
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user