peixue-dev/Archive/peidu-temp-files/sql/🔍详细诊断订单267-2026-01-23.sql

52 lines
957 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.

-- 详细诊断订单267 - 2026-01-23
-- 数据库peixue
USE peixue;
-- 查看订单267的完整信息
SELECT
id,
order_no,
status,
TYPEOF(status) as status_type,
reviewed,
TYPEOF(reviewed) as reviewed_type,
user_id,
teacher_id,
student_id,
pay_status,
complete_time,
service_start_time,
verify_time,
create_time,
update_time
FROM `order`
WHERE id = 267;
-- 检查status字段的实际值和类型
SELECT
id,
status,
status = 4 as is_status_4,
status = '4' as is_status_string_4,
CAST(status AS SIGNED) as status_as_int,
CAST(status AS SIGNED) = 4 as cast_equals_4
FROM `order`
WHERE id = 267;
-- 检查是否有评价记录
SELECT * FROM review WHERE order_id = 267;
-- 检查订单的所有状态相关字段
SELECT
id,
order_no,
status,
pay_status,
refund_status,
is_verified,
reviewed,
deleted
FROM `order`
WHERE id = 267;