-- 订单状态:待排货(入库排货/渠道买价未成功) -- 可重复执行(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';