遍历id,去修改固定的一个值可以用我这个方法。不需要配置任何东西!
这个是我一个定时任务,
xml文件。
代码:
<update id="updateList" parameterType="java.util.List">
update discount_users
set du_flag=1
where du_id in
<foreach item="item" collection="list" open="(" separator="," close=")">
#{item.duId}
</foreach>
</update>