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-08-30 07:28:01 +08:00
2026-03-23 17:10:07 +08:00
2026-04-30 19:20:31 +08:00
2026-07-01 14:00:59 +08:00
2026-04-27 16:09:26 +08:00
2026-09-15 15:31:43 +08:00
2026-09-10 03:46:41 +08:00
2026-09-10 20:59:39 +08:00
2026-08-18 16:25:12 +08:00
2026-09-20 22:12:35 +08:00
2026-08-01 03:44:02 +08:00
2026-05-25 17:08:56 +08:00
2026-05-25 17:08:56 +08:00
2026-08-08 20:28:18 +08:00
2026-09-15 16:19:04 +08:00
2026-09-15 23:49:34 +08:00
2026-09-13 15:29:43 +08:00
2026-05-20 16:31:29 +08:00
2026-05-25 17:08:56 +08:00
2026-04-09 01:36:49 +08:00
2026-04-17 19:21:57 +08:00
2026-05-11 08:44:27 +08:00
2026-08-30 07:28:12 +08:00