From 2fea47ac2138555f0d2be122f2c5c9c44f1b9be2 Mon Sep 17 00:00:00 2001 From: ASUS <515617283@qq.com> Date: Mon, 13 Apr 2026 10:10:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=97=E6=9D=90=E7=9B=91=E6=8E=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/webman/gateway/Events.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/webman/gateway/Events.php b/plugin/webman/gateway/Events.php index 57198b0..cff2fed 100644 --- a/plugin/webman/gateway/Events.php +++ b/plugin/webman/gateway/Events.php @@ -256,7 +256,7 @@ class Events ->fieldRaw('r.cons_info_id AS consId, SUM(r.surplus_stock * ' . $message['number'] . ') AS quantity, cons.stock_number AS current_quantity') ->group('r.cons_info_id') ->select()->toArray(); - if($tb_prod_cons[0]['quantity'] > $tb_prod_cons[0]['current_quantity']) { + if(!empty($tb_prod_cons[0]) && $tb_prod_cons[0]['quantity'] > $tb_prod_cons[0]['current_quantity']) { $snd_data = [ 'msg' => '此商品库存不足', 'operate_type' => $message['operate_type'],