一、参数为List类型
<delete id="physicalDeleteBatchIds">
delete from cart_item
where id in
<foreach collection="batchIds.ids" item="cid" open="(" separator="," close=")">
#{cid}
</foreach>
</delete>
二、参数为字符串类型,且用,号分割
<delete id="physicalDeleteBatchIds">
delete from cart_item
where id in (#{batchIds.ids})
</delete>
网友评论