查价/下单/入库/出库统一校验与计费上下文;待排货状态及可选入库排货;运单号改为 IDE+yyMMddHHmmss;补充迁移 SQL 与测试修复。 Co-authored-by: Cursor <cursoragent@cursor.com>
13 lines
540 B
SQL
13 lines
540 B
SQL
-- 订单状态:待排货(入库排货/渠道买价未成功)
|
||
-- 可重复执行(INSERT IGNORE)
|
||
|
||
INSERT IGNORE INTO `t_dict` (`DictType`, `DictSort`, `DictCode`, `DictName`, `CreateUserId`)
|
||
VALUES ('order_status', 35, 'pendingAllocation', '待排货', 0);
|
||
|
||
-- 历史数据:有排货失败原因但状态仍为待支付的订单,修正为待排货
|
||
UPDATE `t_order`
|
||
SET `OrderStatus` = 'pendingAllocation',
|
||
`UpdateTime` = NOW()
|
||
WHERE TRIM(IFNULL(`AllocationPendingReason`, '')) <> ''
|
||
AND `OrderStatus` = 'pendingPayment';
|