From 98fb3dc53aa30150733e995e7b81db682baf5004 Mon Sep 17 00:00:00 2001 From: ASUS <515617283@qq.com> Date: Sat, 11 Apr 2026 10:53:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/webman/gateway/Events.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugin/webman/gateway/Events.php b/plugin/webman/gateway/Events.php index 3f25ce7..57198b0 100644 --- a/plugin/webman/gateway/Events.php +++ b/plugin/webman/gateway/Events.php @@ -255,9 +255,8 @@ class Events ->where('r.product_id', $message['product_id']) ->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(); - p($tb_prod_cons); - if($tb_prod_cons['quantity'] > $tb_prod_cons['current_quantity']) { + ->select()->toArray(); + if($tb_prod_cons[0]['quantity'] > $tb_prod_cons[0]['current_quantity']) { $snd_data = [ 'msg' => '此商品库存不足', 'operate_type' => $message['operate_type'],