zksu
/
API
forked from yoone/API
1
0
Fork 0

style: 修复代码格式问题,包括空格和空行

This commit is contained in:
tikkhun 2026-01-10 15:17:08 +08:00
parent ecdedcc041
commit 5d7e0090aa
1 changed files with 2 additions and 5 deletions

View File

@ -722,14 +722,14 @@ export class OrderService {
return { return {
product: await this.productModel.findOne({ product: await this.productModel.findOne({
where: { sku: comp.sku }, where: { sku: comp.sku },
relations: ['components','attributes'], relations: ['components', 'attributes'],
}), }),
quantity: comp.quantity * orderItem.quantity, quantity: comp.quantity * orderItem.quantity,
} }
})) : [{ product, quantity: orderItem.quantity }] })) : [{ product, quantity: orderItem.quantity }]
const orderSales: OrderSale[] = componentDetails.map(componentDetail => { const orderSales: OrderSale[] = componentDetails.map(componentDetail => {
if(!componentDetail.product) return null if (!componentDetail.product) return null
const attrsObj = this.productService.getAttributesObject(product.attributes) const attrsObj = this.productService.getAttributesObject(product.attributes)
const orderSale = plainToClass(OrderSale, { const orderSale = plainToClass(OrderSale, {
orderId: orderItem.orderId, orderId: orderItem.orderId,
@ -2639,7 +2639,4 @@ export class OrderService {
throw new Error(`导出CSV文件失败: ${error.message}`); throw new Error(`导出CSV文件失败: ${error.message}`);
} }
} }
} }