fix: Qimen sync cancel + pendingOrder cancel 补运单 is_intercept 标记
- Qimen cancel(syncStatus=fin): 补 is_intercept='Y' - pendingOrder.cancelOrder(synced): 补 is_intercept='Y'
This commit is contained in:
parent
793dca8375
commit
1ea2bc48f7
@ -259,6 +259,18 @@ class orderServer extends MainService {
|
||||
transaction,
|
||||
});
|
||||
|
||||
// 同步更新运单表拦截标记
|
||||
try {
|
||||
await ctx.model.OrderExpress.update(
|
||||
{ is_intercept: 'Y' },
|
||||
{ where: { order_id: existingOrder.id, warehouse_id: info.warehouseId }, transaction }
|
||||
);
|
||||
} catch (expressErr) {
|
||||
ctx.logger.warn(
|
||||
`[qimen order cancel] 更新运单拦截标记失败(sync), orderId=${existingOrder.id}, error=${expressErr.message}`
|
||||
);
|
||||
}
|
||||
|
||||
await transaction.commit();
|
||||
await this.sendCancelInterceptNotice({
|
||||
orderCode,
|
||||
|
||||
@ -2294,6 +2294,18 @@ class PendingOrderService extends OrderBaseService {
|
||||
},
|
||||
}
|
||||
);
|
||||
// 同步更新运单表拦截标记
|
||||
try {
|
||||
const { Op: cancelOp } = this.app.Sequelize;
|
||||
await this.ctx.model.OrderExpress.update(
|
||||
{ is_intercept: 'Y' },
|
||||
{ where: { order_id: { [cancelOp.in]: syncedOrderIds }, warehouse_id: warehouseId } }
|
||||
);
|
||||
} catch (expressErr) {
|
||||
this.ctx.logger.warn(
|
||||
`[PendingOrderService.cancelOrder] 更新运单拦截标记失败, count=${syncedOrderIds.length}, error=${expressErr.message}`
|
||||
);
|
||||
}
|
||||
this.ctx.logger.info(
|
||||
`[PendingOrderService.cancelOrder] 订单已同步,不可取消,已转为拦截处理,订单ID: ${syncedOrderIds.join(',')}`
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user