<select id="your_Function" resultType="com.test.entity.YourEntityName">
SELECT * FROM test_table WHERE xxx_id IN
<foreach item="item" index="index" collection="list"
open="(" separator="," close=")">
#{item}
</foreach>
</select>
返回值是 0 和 1
正常运行返回 ≥ 1 的数值
错误 返回 0
还有一个特别的返回值是 -1 (自行了解)
<update id="your_Function">
<foreach collection="list" item="item" index="index" separator=";">
UPDATE test_table SET xxx_id = #{new_data} WHERE xxx_id = #{item}
</foreach>
</update>
因篇幅问题不能全部显示,请点此查看更多更全内容