From 2a421cd98efb0a192ddb764b534563edba0349e0 Mon Sep 17 00:00:00 2001 From: weigang Date: Sat, 18 Jul 2020 12:15:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E9=A2=86=E5=8F=96=E4=BC=98?= =?UTF-8?q?=E6=83=A0=E5=88=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/CouponController.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/Controller/CouponController.php b/app/Controller/CouponController.php index 7d82af1..9cd6298 100644 --- a/app/Controller/CouponController.php +++ b/app/Controller/CouponController.php @@ -60,9 +60,6 @@ class CouponController extends BaseController } - /** - * 用户领取优惠卷 - */ public function userReceiveCoupon() { $userId = $this->request->input("user_id"); @@ -93,8 +90,7 @@ class CouponController extends BaseController $cr->status = 0; $cr->update_time = $now; $cr->receive_type = $receiveType; - - if ($test) { + if ($test&&($cp->id%2)) { $fail[] = $cp; } else { if ($cr->save()) {