From 9fbaaca7a3165ee7672680462133132f49d31a66 Mon Sep 17 00:00:00 2001 From: lanzu_qsy <334039090@qq.com> Date: Sat, 18 Jul 2020 17:43:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=A2=86=E5=8F=96=E4=BC=98?= =?UTF-8?q?=E6=83=A0=E5=BA=93=E5=AD=98=E5=B0=8F=E4=BA=8E=E9=A2=86=E5=8F=96?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Controller/CouponController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Controller/CouponController.php b/app/Controller/CouponController.php index 9280c58..c4284b5 100644 --- a/app/Controller/CouponController.php +++ b/app/Controller/CouponController.php @@ -120,7 +120,7 @@ class CouponController extends BaseController } else { //TODO 会有超发情况 //如果优惠卷库存小于等于已领取的数量, 则返回领取失败的优惠券 - if ($cp->inventory<=$cp->inventory_use||$cp->inventory<=($cp->inventory_use+$cr->number)){ + if ($cp->inventory<=$cp->inventory_use||$cp->inventory<($cp->inventory_use+$cr->number)){ $fail[] = $cp; }else{ $cp->inventory_use += $cr->number;//记录已领取的数量