From 80e2071efc9c22d5e13044c0d5d23abc691ca416 Mon Sep 17 00:00:00 2001 From: wucongxing8150 <815046773@qq.com> Date: Fri, 31 May 2024 14:11:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E5=8D=B7=E5=8F=91=E6=94=BE=E9=87=8D=E5=A4=8D=E6=80=A7=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/CouponService.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/Services/CouponService.php b/app/Services/CouponService.php index 7bc1650..11ebb20 100644 --- a/app/Services/CouponService.php +++ b/app/Services/CouponService.php @@ -51,15 +51,15 @@ class CouponService extends BaseService } // 判断用户是否已有该优惠卷 -// $params = array(); -// $params['user_id'] = $user_id; -// $params['coupon_id'] = $coupon['coupon_id']; -// $user_coupon = UserCoupon::getOne($params); -// if (!empty($user_coupon)){ -// if ($user_coupon['user_coupon_status'] == 0){ -// return true; -// } -// } + $params = array(); + $params['user_id'] = $user_id; + $params['coupon_id'] = $coupon['coupon_id']; + $user_coupon = UserCoupon::getOne($params); + if (!empty($user_coupon)){ + if ($user_coupon['user_coupon_status'] == 0){ + return true; + } + } // 判断该优惠卷状态 if ($coupon['coupon_status'] != 1){