From 9405101d4700f4273dcf66442e380733dc33db26 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 06 六月 2023 18:21:43 +0800
Subject: [PATCH] 分类树联调
---
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CommonsMapper.xml | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CommonsMapper.xml b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CommonsMapper.xml
index 4cbd321..9f357d7 100644
--- a/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CommonsMapper.xml
+++ b/Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CommonsMapper.xml
@@ -22,5 +22,33 @@
${inSql}
</select>
+ <insert id="insertByBaseModel" parameterType="java.util.Map">
+ insert into ${tableName}
+ (
+ <foreach collection="columnMap" item="value" index="key" separator=",">
+ ${key}
+ </foreach>
+ )
+ <foreach collection="mapList" item="columnMap" separator=" union all ">
+ select <foreach collection="columnMap" item="value" index="key" separator=",">
+ #{value}
+ </foreach>
+ from dual
+ </foreach>
+ </insert>
+
+ <update id="updateBatchByBaseModel" parameterType="java.util.List" >
+ BEGIN
+ <foreach collection="mapList" item="columnMap" index="index" separator=";">
+ update ${tableName}
+ <set>
+ <foreach collection="columnMap" item="value" index="key" separator=",">
+ ${key} = #{value}
+ </foreach>
+ </set>
+ where oid = #{columnMap.oid}
+ </foreach>;
+ END;
+ </update >
</mapper>
--
Gitblit v1.9.3