From bcb19e8c93c3cabf0d8eb3ee34ed819b3c5a10ef Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期一, 25 十一月 2024 13:14:11 +0800
Subject: [PATCH] #优化地图

---
 src/main/resources/mapper/OrderMapper.xml |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/OrderMapper.xml b/src/main/resources/mapper/OrderMapper.xml
index 1ac517d..59deacc 100644
--- a/src/main/resources/mapper/OrderMapper.xml
+++ b/src/main/resources/mapper/OrderMapper.xml
@@ -46,9 +46,29 @@
         update man_order
         set settle = #{settle}
         ,update_time = getdate()
-        ,update_by = #{userId}
+        <if test="userId != null">
+            ,update_by = #{userId}
+        </if>
         where 1=1
         and id = #{orderId}
     </update>
 
+    <select id="selectComplete" resultMap="BaseResultMap">
+        select TOP 5 *
+        from man_order
+        where 1=1
+        and settle = 4
+        and status = 1
+        order by newID(), create_time asc
+    </select>
+
+    <select id="selectorderNoL" resultMap="BaseResultMap">
+        select top 10 *
+        from man_order
+        where 1=1
+        <if test="orderNo != null">
+            and order_no = #{orderNo}
+        </if>
+    </select>
+
 </mapper>

--
Gitblit v1.9.1