<update id="updateBatch" parameterType="java.util.List">UPDATE your_table
SET column1 =(CASE id
<foreach collection="list" item="item"index="index" separator=" ">WHEN#{item.id} THEN #{item.column1} </foreach>END),
column2 =(CASE id
<foreach collection="list" item="item"index="index" separator=" ">WHEN#{item.id} THEN #{item.column2} </foreach>END)WHERE id IN<foreach collection="list" item="item"open="(" separator=","close=")">#{item.id} </foreach></update>
DEMO
UPDATE TABLE_NAME
SET column1 =(CASE id WHEN1THEN'value1'WHEN2THEN'value2'END),
column1 =(CASE id WHEN1THEN'value1'WHEN2THEN'value2'END)WHERE id IN(1,2)