From 4baa6f8706bc99614020fd5ac9a731997f69b194 Mon Sep 17 00:00:00 2001 From: "DESKTOP-GG6FIN9\\Administrator" <15040771@qq.com> Date: Wed, 12 Aug 2020 16:59:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AF=E9=A2=86=E5=8F=96=E6=8E=A5=E5=8F=A3bu?= =?UTF-8?q?g=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/CouponService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Service/CouponService.php b/app/Service/CouponService.php index 994b899..6105ea5 100644 --- a/app/Service/CouponService.php +++ b/app/Service/CouponService.php @@ -72,7 +72,7 @@ class CouponService implements CouponServiceInterface // 转发型优惠券 $couponReceiveIds = $couponActivity === false ? [] : explode(',',$couponActivity['forward']); - + $whereC = [ ['u.end_time','>',$nowTime], ['u.start_time','<=',$nowTime], @@ -85,7 +85,7 @@ class CouponService implements CouponServiceInterface $coupons = Db::table('ims_system_coupon_user as u') ->join('ims_system_coupon_user_receivetype as type', 'u.id', '=', 'type.system_coupon_user_id') - ->whereIn('u.id', $couponIds) + ->whereIn('u.id', $couponReceiveIds) ->where($whereC) ->whereRaw('u.inventory_use < u.inventory and u.inventory-u.inventory_use >= type.one_receive_number') ->select('u.*','type.one_receive_number')