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}`); } } - - - }