From 6cb793b3caf72e7e82623c6fb351ebb67721e5e7 Mon Sep 17 00:00:00 2001 From: tikkhun Date: Sat, 24 Jan 2026 10:22:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=BA=93=E5=AD=98=E6=9C=8D=E5=8A=A1):=20?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=BD=AC=E7=A7=BB=E7=89=A9=E5=93=81=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E4=B8=AD=E4=BA=A7=E5=93=81=E5=90=8D=E7=A7=B0=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将查询中的 productName 字段改为 name 字段以正确获取产品名称 --- src/service/stock.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/service/stock.service.ts b/src/service/stock.service.ts index bc7d4e1..05bed63 100644 --- a/src/service/stock.service.ts +++ b/src/service/stock.service.ts @@ -547,7 +547,7 @@ export class StockService { qb .select([ 'ti.transferId AS transferId', - "JSON_ARRAYAGG(JSON_OBJECT('id', ti.id, 'productName', ti.productName,'sku', ti.sku, 'quantity', ti.quantity)) AS items", + "JSON_ARRAYAGG(JSON_OBJECT('id', ti.id, 'productName', ti.name,'sku', ti.sku, 'quantity', ti.quantity)) AS items", ]) .from(TransferItem, 'ti') .groupBy('ti.transferId'),