-- 修复现有订单状态
-- 将已审批但状态仍为2的订单更新为状态3（已完成）

UPDATE order_fund 
SET status = 3,
    update_time = NOW()
WHERE order_no IN (
    'F20260324013123000002',
    'F202603240004937000000'
)
AND status = 2
AND approve_time IS NOT NULL;

-- 验证更新结果
SELECT 
    id,
    order_no,
    type,
    status,
    amount,
    approve_time,
    confirm_time,
    update_time
FROM order_fund
WHERE order_no IN (
    'F20260324013123000002',
    'F202603240004937000000'
);
