<updateid="updateBatch"> UPDATE a
SET
name = CASE id
<foreachcollection ="inputList"item="item"> WHEN #{item.id} THEN
<choose><whentest="item.name != null"> #{item.name}
</when><otherwise> name
</otherwise></choose></foreach> END
, age = CASE id
<foreachcollection ="inputList"item="item"> WHEN #{item.age} THEN
<choose><whentest="item.age != null"> #{item.age}
</when><otherwise> age
</otherwise></choose></foreach> END
WHERE id in
<foreachcollection ="inputList"item="item"open="("separator=","close=")"> #{item.id}
</foreach></update>