From 4774262178d53a6b2aed9b5415e09d766288872c Mon Sep 17 00:00:00 2001 From: dzl <786316265@qq.com> Date: Mon, 20 Oct 2025 17:21:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/orders.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/orders.js b/routes/orders.js index 23d91b5..20d45e1 100644 --- a/routes/orders.js +++ b/routes/orders.js @@ -1373,9 +1373,9 @@ router.post('/confirm-payment', auth, async (req, res) => { }); await connection.execute( - `UPDATE orders SET status = 'pending', address = ?, updated_at = NOW() + `UPDATE orders SET status = 'pending', address = ?, updated_at = NOW(), coupon_record_id = ? WHERE id = ?`, - [addressStr, order_id] + [addressStr, couponRecordId === undefined ? null : couponRecordId, order_id] ); // 减组合库存