liufumingren
e76a6e3fa4
fix(order): 奇门/openapi 查单与取消接口跨分表查单
新增 app/lib/order_lookup.js 共享辅助函数(preloadOrderModels/findOrderAcrossTables/
findOrderByCodeAcrossTables),按 current→dispatch→history→outsourced 顺序命中即停;
模型预取置于事务外(工厂首次获取可能执行 DDL 隐式提交),事务内查询支持透传行锁。
改造 4 处接口:
- qimen deliveryorder.query / openapi deliveryorder.query:跨表查单,
订单流转到配送/历史表后不再误报"未找到订单"(避免货主误判重推);
- qimen order.cancel / openapi order.cancel:跨表查找,命中非 current 表
且 status=cancel 时幂等返回取消成功,其余情况返回"未找到对应的订单"。
回归验证(真实网关,脚本在 test/ 不入库):
- openapi:query 命中 dispatch、cancel 幂等成功、不存在单号报错
- qimen:同 4 场景全部符合预期
2026-09-20 22:12:35 +08:00
..
2026-07-01 14:00:59 +08:00
2026-09-18 22:38:57 +08:00
2026-09-13 02:24:37 +08:00
2026-09-20 22:12:35 +08:00
2026-09-20 22:12:35 +08:00
2026-09-20 18:39:16 +08:00
2026-09-20 18:39:20 +08:00
2026-08-14 23:06:05 +08:00
2026-04-09 01:36:49 +08:00
2026-03-16 14:01:22 +08:00
2026-07-01 14:00:59 +08:00
2026-07-01 14:00:59 +08:00
2026-08-27 17:58:52 +08:00
2026-05-06 17:53:54 +08:00
2026-09-13 15:29:43 +08:00
2026-07-27 03:49:27 +08:00
2026-08-08 00:17:38 +08:00