替换 {} 括住的信息
update {table_name}
<trim prefix="set" suffixOverrides=",">
<trim prefix="{column_name1} =case" suffix="end,">
<foreach collection="list" item="s">
when id = #{s.id}
then {val1}
</foreach>
</trim>
<trim prefix="{column_name2} =case" suffix="end,">
<foreach collection="list" item="s">
when id = #{s.id}
then {val2}
</foreach>
</trim>
<trim prefix="update_time =case" suffix="end,">
<foreach collection="list" item="s">
when id = #{s.id}
then now()
</foreach>
</trim>
</trim>
<where>
id in
<foreach collection="list" separator="," item="s" open="(" close=")">
#{s.id}
</foreach>
</where>