原因
xml文档不规范!
将 foreach 写到同一行!也许换行会包含空格!
根据情况适当调整格式吧,有时候不一定是语法的问题!(总结思路)
错误写法 ↓
<delete id="multipleDelete">
DELETE FROM detection WHERE id IN
<foreach collection="idList" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
正确写法 ↓
<delete id="multipleDelete">
DELETE FROM detection WHERE id IN
<foreach collection="idList" item="item" open="(" separator="," close=")">#{item}</foreach>
</delete>