From 84929b69048303a1507bc57cb766db15fd5bdd79 Mon Sep 17 00:00:00 2001 From: liufumingren Date: Fri, 21 Aug 2026 23:34:19 +0800 Subject: [PATCH] =?UTF-8?q?docs(returnUnpack):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E8=BD=A6=E9=81=93=E5=AE=9A=E4=BD=8D=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E8=AE=B0=E5=BD=95=E5=B9=B6=E8=BF=98=E5=8E=9F=20create?= =?UTF-8?q?=20=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - methods/changes/system.json: 移除 returnUnpack.orderLocationLane 变更记录 - methods/system.json: returnUnpack.create 描述移除顶层 order_items 提及 --- methods/changes/system.json | 18 ------------------ methods/system.json | 2 +- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/methods/changes/system.json b/methods/changes/system.json index a550334..c70c931 100644 --- a/methods/changes/system.json +++ b/methods/changes/system.json @@ -1,22 +1,4 @@ [ - { - "version": "2026.08.21-returnUnpack.orderLocationLane", - "date": "2026-08-21", - "type": "fixed", - "summary": "returnUnpack 原订单详情解析修复:优先按订单 id 序列表(wms_order_id_location_{warehouseId})定位订单所在车道(current/history/dispatch/outsourced)直接查对应分表,未命中再按 current→history→dispatch→outsourced 遍历、最后回退基表。修复订单位于 history/dispatch 车道时 create/detail 返回 order=null、order_items=null 的问题。", - "methods": [ - "returnUnpack.create", - "returnUnpack.detail", - "returnUnpack.queryByWaybill" - ], - "notes": [ - "app/service/systems/afterSale.js _resolveOrderDetail:主记录查询由「基表优先→current 分表」改为「OrderDeliveryFactory.getOrderLocation 序列表定位车道优先→current/history/dispatch/outsourced 四车道遍历→基表回退(存量订单)」;商品明细回退查询同步按定位车道优先遍历 current/history/dispatch 三个 items 分表", - "app/service/systems/return_unpack.js _resolveReturnOrderInfo:原订单兜底查询同改(交易单号/快递信息),查退回场景同步受益", - "序列表未回填的存量订单(getOrderLocation 返回 null)自动落入遍历回退,行为不退化;定位/单表查询失败仅告警不阻断主流程", - "无 API 出参结构变化(仅修复 order/order_items 由 null 变正常返回),methods/system.json 无需更新" - ], - "module": "returnUnpack" - }, { "version": "2026.08.21-returnUnpack.create-orderItems", "date": "2026-08-21", diff --git a/methods/system.json b/methods/system.json index d174630..e22ef73 100644 --- a/methods/system.json +++ b/methods/system.json @@ -36210,7 +36210,7 @@ "list": [ { "method": "returnUnpack.create", - "description": "开拆包单(明细不在此提交,由 returnUnpack.addDetail 逐件录入)。用 waybill_code 反查 wms_order_express 判定是否原单退回,命中则回填 order_express_id/order_id/store_id 及订单信息快照(source_order_codes 平台交易单号 / shop_name 店铺名称=货主自定义店铺名称 store_remask)并返回原订单详情(order)与顶层原单商品明细(order_items);未命中原单时按 warehouse_id+waybill_code 从 wms_return_query_log 反查货主(限最近 3 个月内登记)。幂等复用:同一仓库同一运单号 3 个月内已存在非 cancelled 拆包单时,不重复创建,直接返回已有拆包单的主表+明细(record.details)+视频(record.videos)+原订单详情(order),并携带 reused=true 标识;同运单号存在多张拆包单时优先复用已录明细的最新单(按明细表真实计数判定),超过 3 个月视为运单号已复用,按新单正常创建。拆包单号规则 RP+YYYYMMDD+6位序号。仓库隔离:warehouse_id 由服务端注入 ctx.user.store_id,禁止前端传入。", + "description": "开拆包单(明细不在此提交,由 returnUnpack.addDetail 逐件录入)。用 waybill_code 反查 wms_order_express 判定是否原单退回,命中则回填 order_express_id/order_id/store_id 及订单信息快照(source_order_codes 平台交易单号 / shop_name 店铺名称=货主自定义店铺名称 store_remask)并返回原订单详情;未命中原单时按 warehouse_id+waybill_code 从 wms_return_query_log 反查货主(限最近 3 个月内登记)。幂等复用:同一仓库同一运单号 3 个月内已存在非 cancelled 拆包单时,不重复创建,直接返回已有拆包单的主表+明细(record.details)+视频(record.videos)+原订单详情(order),并携带 reused=true 标识;同运单号存在多张拆包单时优先复用已录明细的最新单(按明细表真实计数判定),超过 3 个月视为运单号已复用,按新单正常创建。拆包单号规则 RP+YYYYMMDD+6位序号。仓库隔离:warehouse_id 由服务端注入 ctx.user.store_id,禁止前端传入。", "isNeedAuth": true, "isNeedLogin": true, "headers": [],