fujunling
2023-06-16 7d2abb005f5dde19542a2d21c142680098236901
Source/UBCS/ubcs-service/ubcs-code/src/main/resources/mapper/CommonsMapper.xml
@@ -22,6 +22,14 @@
        ${inSql}
    </select>
    <select id="queryCountBySql" resultType="java.lang.Integer">
        ${inSql}
    </select>
    <select id="queryByOnlySqlForMap" resultType="java.util.Map">
        ${inSql}
    </select>
    <insert id="insertByBaseModel" parameterType="java.util.Map">
        insert into ${tableName}
        (
@@ -37,4 +45,22 @@
        </foreach>
    </insert>
    <insert id="deleteByTaleAndOid" >
        delete from ${tableName} where oid in (${oids})
    </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>