From 5d7e0090aa0bf84585d0b5a0c0c14eed56e13191 Mon Sep 17 00:00:00 2001 From: tikkhun Date: Sat, 10 Jan 2026 15:17:08 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E9=97=AE=E9=A2=98=EF=BC=8C=E5=8C=85=E6=8B=AC?= =?UTF-8?q?=E7=A9=BA=E6=A0=BC=E5=92=8C=E7=A9=BA=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/service/order.service.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/service/order.service.ts b/src/service/order.service.ts index f0aaca7..86a9d50 100644 --- a/src/service/order.service.ts +++ b/src/service/order.service.ts @@ -722,14 +722,14 @@ export class OrderService { return { product: await this.productModel.findOne({ where: { sku: comp.sku }, - relations: ['components','attributes'], + relations: ['components', 'attributes'], }), quantity: comp.quantity * orderItem.quantity, } })) : [{ product, quantity: orderItem.quantity }] const orderSales: OrderSale[] = componentDetails.map(componentDetail => { - if(!componentDetail.product) return null + if (!componentDetail.product) return null const attrsObj = this.productService.getAttributesObject(product.attributes) const orderSale = plainToClass(OrderSale, { orderId: orderItem.orderId, @@ -2639,7 +2639,4 @@ export class OrderService { throw new Error(`导出CSV文件失败: ${error.message}`); } } - - - }