From 94ec4e9e9214cb5dc28aef4a7f38be462cfda728 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 22 五月 2026 16:50:09 +0800
Subject: [PATCH] fix(product): 产品型号复制功能的进行勾选复制

---
 src/main/resources/mapper/sales/SalesLedgerProductMapper.xml |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml b/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
index e0f219f..5d1232c 100644
--- a/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
+++ b/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
@@ -14,7 +14,9 @@
         END as has_sufficient_stock
         FROM
         sales_ledger_product T1
-        LEFT JOIN stock_inventory t2 ON T1.product_model_id = t2.product_model_id
+        LEFT JOIN stock_inventory t2
+        ON T1.product_model_id = t2.product_model_id
+        AND t2.id = T1.stock_id
         LEFT JOIN product_model T3 ON T1.product_model_id = T3.id
         <where>
             <if test="salesLedgerProduct.salesLedgerId != null">

--
Gitblit v1.9.3