Mybatis in 逗号分隔字符串

<update id="softDel" parameterType="String">
SELECT * FROM study WHERE id in
<foreach item="item" index="index" collection="ids.split(',')" open="(" separator="," close=")"> #{item} </foreach>
</update>

String ids = “1,2,3”,如ids作为参数。

posted @ 2022-07-01 16:52  花田007  阅读(392)  评论(0编辑  收藏  举报