系统判断配送限制

This commit is contained in:
2026-07-26 09:59:38 +08:00
parent 19cb312465
commit da21cd3daa
12 changed files with 176 additions and 10 deletions
@@ -34,6 +34,9 @@ export class AdminOrdersService {
if (query.userId) where.userId = BigInt(query.userId);
if (query.cityId) where.cityId = BigInt(query.cityId);
if (query.receiverPhone) where.receiverPhone = { contains: query.receiverPhone };
if (query.fulfillmentHold === true || query.fulfillmentHold === 'true') {
where.fulfillmentHold = true;
}
if (query.createdFrom || query.createdTo) {
where.createdAt = {};
if (query.createdFrom) where.createdAt.gte = new Date(query.createdFrom);
@@ -256,6 +259,10 @@ export class AdminOrdersService {
},
});
}
await tx.order.update({
where: { id },
data: { fulfillmentHold: false, fulfillmentHoldReason: null },
});
});
await this.tradeService.applyStatusTransition(id, order.status, 'SHIPPING', 'HQ_SHIP');