系统判断配送限制
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -60,6 +60,10 @@ export class AdminOrdersQueryDto extends PaginationQueryDto {
|
||||
@IsString()
|
||||
receiverPhone?: string;
|
||||
|
||||
/** 仅看大单拦截待总部确认:true / 1 */
|
||||
@IsOptional()
|
||||
fulfillmentHold?: string | boolean;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
createdFrom?: string;
|
||||
|
||||
Reference in New Issue
Block a user