From 4a16f209719581b777c003c064552b7f10a79b60 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期一, 20 四月 2026 09:15:58 +0800
Subject: [PATCH] chore: 去除重复依赖

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

diff --git a/src/main/resources/mapper/stock/StockUninventoryMapper.xml b/src/main/resources/mapper/stock/StockUninventoryMapper.xml
index e043bd7..d48acfa 100644
--- a/src/main/resources/mapper/stock/StockUninventoryMapper.xml
+++ b/src/main/resources/mapper/stock/StockUninventoryMapper.xml
@@ -25,7 +25,8 @@
             </if>
             update_time = now()
         </set>
-        where product_model_id = #{ew.productModelId} and qualitity >= #{ew.qualitity}
+        where product_model_id = #{ew.productModelId}
+          and (qualitity - COALESCE(locked_quantity, 0)) >= #{ew.qualitity}
     </update>
     <update id="updateAddStockUnInventory">
         update stock_uninventory

--
Gitblit v1.9.3