From 9e097fb25f494424ad79800c78b635fc94175f37 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 13 八月 2026 13:53:20 +0800
Subject: [PATCH] feat(stock): 添加库存查询按型号过滤功能

---
 src/main/resources/mapper/stock/StockInventoryMapper.xml |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/stock/StockInventoryMapper.xml b/src/main/resources/mapper/stock/StockInventoryMapper.xml
index 521ddd2..44a51ef 100644
--- a/src/main/resources/mapper/stock/StockInventoryMapper.xml
+++ b/src/main/resources/mapper/stock/StockInventoryMapper.xml
@@ -165,6 +165,9 @@
                 where p.product_name like concat('%',#{ew.productName},'%') or pm.model like concat('%',#{ew.productName},'%')
                 )
             </if>
+            <if test="ew.model != null and ew.model !=''">
+                and combined.model like concat('%',#{ew.model},'%')
+            </if>
             <if test="ew.topParentProductId != null and ew.topParentProductId > 0">
                 and combined.product_id in (select id from product_tree)
             </if>

--
Gitblit v1.9.3