From cd280ead41b98ee60154038e36d9b83cc25e7d16 Mon Sep 17 00:00:00 2001
From: lsh <1>
Date: 星期三, 20 十二月 2023 12:55:25 +0800
Subject: [PATCH] #
---
src/main/resources/mapper/OrderMapper.xml | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/OrderMapper.xml b/src/main/resources/mapper/OrderMapper.xml
index 1ac517d..db8816d 100644
--- a/src/main/resources/mapper/OrderMapper.xml
+++ b/src/main/resources/mapper/OrderMapper.xml
@@ -46,9 +46,24 @@
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 create_time asc
+ </select>
+
+ <insert id="addToLogTable">
+ INSERT INTO man_order_log SELECT * FROM man_order WHERE id = #{id}
+ </insert>
+
</mapper>
--
Gitblit v1.9.1