From 17b7b94be320d52fe398d3c573e4e52691475756 Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期四, 07 五月 2026 13:31:10 +0800
Subject: [PATCH] config(jghg): 更新配置文件中的路径和数据库连接信息

---
 src/main/resources/mapper/production/ProductOrderMapper.xml |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/production/ProductOrderMapper.xml b/src/main/resources/mapper/production/ProductOrderMapper.xml
index 6b993bf..f8d10e0 100644
--- a/src/main/resources/mapper/production/ProductOrderMapper.xml
+++ b/src/main/resources/mapper/production/ProductOrderMapper.xml
@@ -110,4 +110,14 @@
         WHERE create_time &gt;= #{startDate} AND create_time &lt;= #{endDate}
           AND complete_quantity &lt; quantity
     </select>
+
+    <update id="addCompleteQtyIfNotExceed">
+        update product_order
+        set
+            complete_quantity = complete_quantity + #{delta},
+            start_time = ifnull(start_time, now()),
+            end_time = case when (complete_quantity + #{delta}) = quantity then now() else end_time end
+        where id = #{id}
+          and (complete_quantity + #{delta}) <![CDATA[ <= ]]> quantity
+    </update>
 </mapper>

--
Gitblit v1.9.3