From 7ea34ef84e0e4769f536a43df75a72ff5f90786d Mon Sep 17 00:00:00 2001 From: ASUS <515617283@qq.com> Date: Fri, 27 Mar 2026 14:10:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugin/webman/gateway/Events.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugin/webman/gateway/Events.php b/plugin/webman/gateway/Events.php index 5784b74..84fd469 100644 --- a/plugin/webman/gateway/Events.php +++ b/plugin/webman/gateway/Events.php @@ -237,9 +237,11 @@ class Events base::gateway_query('sendToUid', [$s_id, json_encode($snd_data)]); return; } - $product = Db::query(" - SELECT * FROM `tb_product` WHERE - `id`={$message['product_id']}"); + if(!empty($message['product_id'])) { + $product = Db::query(" + SELECT * FROM `tb_product` WHERE + `id`={$message['product_id']}"); + } // 如果是新增或者编辑,查询库存够不够 if ( (!empty($message['operate_type']) && ($message['operate_type'] == 'add' || $message['operate_type'] == 'edit')) &&