1. <update id="deleteQnrCount" parameterType="java.util.List">
update t_qs_qnr_count
set
COUNT_STS_CD='2'
where COUNT_ID IN
<foreach collection="list" item="item" separator=","
open="(" close=")">
#{item, jdbcType=VARCHAR}
</foreach>
</update>
collection中为list,item中可以自定义
2.
<!-- 批量插入问题 -->
<insert id="insertQus" parameterType="java.util.List">
insert into t_qs_qubank_questions
(question_id,format)
values
<foreach collection="list" item="item" index="index" separator=",">
(
#{item.questionId,jdbcType=VARCHAR},
#{item.format, jdbcType=VARCHAR}
)
</foreach>
</insert>
传入参数为List<Map<String,Object>>,获取Map中的值就要item.key值