From 0c2e2f054c1e549c09dbf3f85c82aedf9dd32974 Mon Sep 17 00:00:00 2001 From: "DESKTOP-GG6FIN9\\Administrator" <15040771@qq.com> Date: Fri, 31 Jul 2020 09:43:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8=E5=BA=93?= =?UTF-8?q?=E5=AD=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 409c2cf..e1b7815 100644 --- a/app/Controller/CouponController.php +++ b/app/Controller/CouponController.php @@ -76,7 +76,7 @@ class CouponController extends BaseController $c = Db::table('ims_system_coupon_user as u') ->where($whereC) ->join('ims_system_coupon_user_receivetype as type', 'u.id', '=', 'type.system_coupon_user_id') - ->whereRaw('u.inventory_use <= u.inventory and u.inventory-u.inventory_use > type.one_receive_number') + ->whereRaw('u.inventory-u.inventory_use >= type.one_receive_number') // ->whereIn('u.id',$c_ids) // ->whereNotIn('u.id',$cr_ids) ->whereIn('u.id', $couponIds) From a480eaa3df9406ef4d488e7e72ae8b1651d0ffb9 Mon Sep 17 00:00:00 2001 From: "DESKTOP-GG6FIN9\\Administrator" <15040771@qq.com> Date: Fri, 31 Jul 2020 09:58:12 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8=E5=BA=93?= =?UTF-8?q?=E5=AD=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 e1b7815..6e73066 100644 --- a/app/Controller/CouponController.php +++ b/app/Controller/CouponController.php @@ -76,7 +76,7 @@ class CouponController extends BaseController $c = Db::table('ims_system_coupon_user as u') ->where($whereC) ->join('ims_system_coupon_user_receivetype as type', 'u.id', '=', 'type.system_coupon_user_id') - ->whereRaw('u.inventory-u.inventory_use >= type.one_receive_number') + ->whereRaw('u.inventory_use < u.inventory and u.inventory-u.inventory_use >= type.one_receive_number') // ->whereIn('u.id',$c_ids) // ->whereNotIn('u.id',$cr_ids) ->whereIn('u.id', $couponIds)