From e6894cc4235168af7f15dfc241eb6bdf0badd0d5 Mon Sep 17 00:00:00 2001 From: vine_liutk <961510893@qq.com> Date: Tue, 14 Dec 2021 11:01:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B9=E6=8D=AE=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E8=AE=A2=E5=8D=95=E6=9F=A5=E8=AF=A2=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=8F=AF=E7=94=A8=E4=BC=98=E6=83=A0=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/CouponService.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/Services/CouponService.php b/app/Services/CouponService.php index e6ec1b47..5ff86c39 100644 --- a/app/Services/CouponService.php +++ b/app/Services/CouponService.php @@ -47,8 +47,7 @@ class CouponService { return UserCoupon::with('ranges')->where([ 'user_id'=>$user->id, - 'status'=>0, - ])->where('use_start_at', '<=', now())->where('use_end_at', '>=', now())->get(); + ])->unuse()->get(); } /**