就是有多个id组成的字符串String ids = "1,2,3,4",现在想要不将其切割成数组的情况下在mybatis中遍历执行根据id删除的操作怎么做?我这里报错:
<where>
u.id IN
<foreach collection="#{param1}" item="item" index="index" open="(" separator="," close=")">
'${item}'
</foreach>
就是有多个id组成的字符串String ids = "1,2,3,4",现在想要不将其切割成数组的情况下在mybatis中遍历执行根据id删除的操作怎么做?我这里报错:
<where>
u.id IN
<foreach collection="#{param1}" item="item" index="index" open="(" separator="," close=")">
'${item}'
</foreach>
4 回答1.1k 阅读✓ 已解决
4 回答807 阅读✓ 已解决
1 回答2.5k 阅读✓ 已解决
1 回答1.1k 阅读✓ 已解决
2 回答661 阅读✓ 已解决
2 回答1.6k 阅读
2 回答1.6k 阅读
试试?