@@ -135,10 +135,10 @@ export class AdminOrdersService {
|
||||
if (dto.warehouseId) {
|
||||
const warehouseId = BigInt(dto.warehouseId);
|
||||
const warehouseRow = await this.prisma.cityWarehouse.findFirst({
|
||||
where: { id: warehouseId, cityId: order.cityId, status: 'ACTIVE' },
|
||||
where: { id: warehouseId, status: 'ACTIVE' },
|
||||
});
|
||||
if (!warehouseRow) {
|
||||
throw new BadRequestException('仓库不存在或不属于该订单开城城市');
|
||||
throw new BadRequestException('仓库不存在或已停用');
|
||||
}
|
||||
if (order.fulfillmentWarehouseId !== warehouseId) {
|
||||
await this.prisma.order.update({
|
||||
|
||||
Reference in New Issue
Block a user