新增 mark-problematic/mark-claimed/handle-status 接口,异常事件审计表与占位符渲染;inApp/email 通知及下单/入库/出库自动触发运行时。 Co-authored-by: Cursor <cursoragent@cursor.com>
13 lines
465 B
SQL
13 lines
465 B
SQL
-- 问题件 / 已理赔 子状态: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');
|