fix: confirmIntercept 同步设置 is_intercept=Y + is_back=Y 到所有运单
之前 confirmIntercept 仅对 is_intercept=Y 的运单设 is_back=Y, 但 confirmIntercept 入口不经过 AI 波次感知,运单可能未被标记拦截, 导致确认拦截后运单表标记不生效。 改为订单级统一设置 is_intercept+is_back,覆盖所有运单。
This commit is contained in:
parent
64c24f963d
commit
793dca8375
@ -3611,15 +3611,15 @@ class RecheckOrderService extends OrderBaseService {
|
||||
throw new Error('拦截状态更新失败,请稍后重试');
|
||||
}
|
||||
|
||||
// 同步更新运单表:仅对已标记拦截的运单设置退回标记
|
||||
// 同步更新运单表:标记拦截 + 退回
|
||||
try {
|
||||
await ctx.model.OrderExpress.update(
|
||||
{ is_back: 'Y' },
|
||||
{ where: { order_id: orderId, warehouse_id: warehouseId, is_intercept: 'Y' } }
|
||||
{ is_intercept: 'Y', is_back: 'Y' },
|
||||
{ where: { order_id: orderId, warehouse_id: warehouseId } }
|
||||
);
|
||||
} catch (expressErr) {
|
||||
ctx.logger.warn(
|
||||
`[recheckOrder.confirmIntercept] 更新运单退回标记失败, orderId=${orderId}, error=${expressErr.message}`
|
||||
`[recheckOrder.confirmIntercept] 更新运单拦截/退回标记失败, orderId=${orderId}, error=${expressErr.message}`
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user