MyBatis 批量修改记录

      <update id="update" parameterType="java.util.List">
UPDATE setting
SET content = CASE id
<foreach collection="list" item="setting" >
WHEN #{setting.id} THEN #{setting.content}
</foreach>
END
WHERE
id in (<foreach collection="list" item="setting" separator="," >
#{setting.id}
</foreach>
)
</update>
上一篇:Dictionary通过Value找到它的key


下一篇:kappa系数