admin/sql/migrate_t_order_handle_status.sql
zzh 90f6c25b04 feat(order): 问题件/理赔件标记、通知投递与自动触发
新增 mark-problematic/mark-claimed/handle-status 接口,异常事件审计表与占位符渲染;inApp/email 通知及下单/入库/出库自动触发运行时。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 16:46:52 +08:00

13 lines
465 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.

-- 问题件 / 已理赔 子状态:pending-待处理 processed-已处理
ALTER TABLE `t_order`
ADD COLUMN `HandleStatus` VARCHAR(16) NULL DEFAULT 'pending' COMMENT '处理子状态:pending/processed' AFTER `OrderStatus`;
UPDATE `t_order`
SET `HandleStatus` = 'pending'
WHERE `HandleStatus` IS NULL
AND `OrderStatus` IN ('problematic', 'claimed');
UPDATE `t_order`
SET `HandleStatus` = NULL
WHERE `OrderStatus` NOT IN ('problematic', 'claimed');