peixue-dev/Archive/peidu-temp-files/sql/🚀立即修复-订单264状态-2026-01-23.sql

43 lines
782 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 立即修复订单264状态 - 2026-01-23
-- 数据库peixue
USE peixue;
-- 步骤1: 查看当前订单状态
SELECT
id,
order_no,
status,
reviewed,
user_id,
teacher_id,
student_id
FROM `order`
WHERE id = 264;
-- 步骤2: 将订单状态改为4已完成
UPDATE `order`
SET
status = 4, -- 改为已完成
reviewed = 0, -- 确保未评价
complete_time = NOW() -- 设置完成时间
WHERE id = 264;
-- 步骤3: 清理可能存在的旧评价记录
DELETE FROM review WHERE order_id = 264;
-- 步骤4: 验证修复结果
SELECT
id,
order_no,
status,
reviewed,
complete_time
FROM `order`
WHERE id = 264;
-- 预期结果:
-- status = 4
-- reviewed = 0
-- complete_time = 当前时间