标签:air ace des 参数 插入 .sh list maxheight long
批量插入格式示例:
<insert id="insertAirspaceList" parameterType="java.util.List" >
insert into airspace(name, code, type, shape_type, min_height, max_height, limitation_type, status,is_deleted, is_usable,shape_description)
VALUES
<foreach collection="list" item="item" index="index"
separator=",">
(#{item.name,jdbcType=VARCHAR},
#{item.code,jdbcType=VARCHAR},
#{item.type,jdbcType=BIT},
#{item.shapeType,jdbcType=SMALLINT},
#{item.minHeight,jdbcType=INTEGER},
#{item.maxHeight,jdbcType=DOUBLE},
#{item.limitationType,jdbcType=SMALLINT},
#{item.status,jdbcType=TINYINT},
#{item.isDeleted,jdbcType=TINYINT},
#{item.isUsable,jdbcType=TINYINT},
#{item.shapeDescription,jdbcType=LONGVARCHAR})
</foreach>
</insert>
批量更新示例:
list包含四个参数:id,sendCompleteTime,failCause,status
<update id="updateSendFaxLogList" parameterType="java.util.List">
update send_fax_log
set send_complete_time =
<foreach collection="list" item="item" index="index"
separator=" " open="case id" close="end,">
when #{item.id} then #{item.sendCompleteTime,jdbcType=TIMESTAMP}
</foreach>
fail_cause =
<foreach collection="list" item="item" index="index"
separator=" " open="case id" close="end,">
when #{item.id} then #{item.failCause,jdbcType=VARCHAR}
</foreach>
status =
<foreach collection="list" item="item" index="index"
separator=" " open="case id" close="end">
when #{item.id} then #{item.status,jdbcType=TINYINT}
</foreach>
where id in
<foreach collection="list" index="index" item="item"
separator="," open="(" close=")">
#{item.id,jdbcType=INTEGER}
</foreach>
</update>
标签:air ace des 参数 插入 .sh list maxheight long
原文地址:https://www.cnblogs.com/liuruilongdn/p/9098782.html