From 12253875406a93c2cc0f02d4abc87505e9898b15 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期日, 12 十一月 2023 20:20:03 +0800 Subject: [PATCH] 历史数据导入,单次导入超过800条报错变量溢出bug --- Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CommonsMapper.xml | 29 +++++++++++++++++++++++++++++ 1 files changed, 29 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 eb6db99..af5be61 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 @@ -17,6 +17,10 @@ ${inSql} </select> + <select id="selectCountByTableName" resultType="java.lang.String"> + select COUNT(*) FROM ${tableName} + </select> + <select id="selectBySql" resultType="java.util.Map"> ${inSql} </select> @@ -48,6 +52,22 @@ </foreach> </insert> + <!--<insert id="insertByBaseModel" parameterType="java.util.Map"> + <foreach collection="mapList" item="value" index="key" separator=","> + 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> + </foreach> + </insert>--> + <insert id="deleteByTaleAndOid" > delete from ${tableName} where oid in (${oids}) </insert> @@ -82,4 +102,13 @@ where nameoid = #{nameoid} </select> + <select id="getCurrentRevision" resultType="map" > + select max(revisionSeq) revisionSeq, + max(RevisionValue) revisionVal, + max(VersionSeq) VersionSeq, + max(VersionValue) VersionVal + from ${tableName} + where nameoid = #{nameoid} + </select> + </mapper> -- Gitblit v1.9.3