mybatis 传参是 list<string> 的注意事项

<!--付款 批量 修改账单状态-->
<update id="editbillpayALL" parameterType="java.util.List">
UPDATE
tb_bill
SET
STATE = 'eda58d7280554dd9918207d27e2d4654'
WHERE
ID IN <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
</update>

调试很久,一直写的
#{item.id} 当传的list 的时候 直接写
#{item}即可
posted @ 2017-10-26 11:48  caozengling  阅读(15890)  评论(0编辑  收藏  举报