From 1f0cf4acaa1a440482c8a7fe1c2e657422fbea59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=B1=95=E9=B9=8F?= Date: Sat, 6 Dec 2025 03:25:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8E=92=E9=99=A4=E5=B7=B2=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E7=9A=84=E8=AE=A2=E5=8D=95=E5=9C=A8=E5=BE=85=E5=A4=84?= =?UTF-8?q?=E7=90=86=E9=A2=84=E7=BA=A6=E6=9F=A5=E8=AF=A2=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改SQL查询条件,添加status != '已取消'过滤,确保已取消的订单不会出现在待处理预约列表中 --- pending_bookings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pending_bookings.php b/pending_bookings.php index 553cc25..7415727 100644 --- a/pending_bookings.php +++ b/pending_bookings.php @@ -120,8 +120,8 @@ $booking_schedule = []; $bookings_by_date = []; try { - // 获取所有未来的预约 - $stmt = $pdo->prepare("SELECT * FROM bookings WHERE end_time > NOW() ORDER BY start_time ASC"); + // 获取所有未来的预约(排除已取消的订单) + $stmt = $pdo->prepare("SELECT * FROM bookings WHERE end_time > NOW() AND status != '已取消' ORDER BY start_time ASC"); $stmt->execute(); $all_bookings = $stmt->fetchAll();