使用Long[] applyIds传参
<foreach collection="array" item="applyId" open="(" separator="," close=")">
#{applyId}
</foreach>
使用List<Long> applyIds传参
<foreach item="item" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
使用类集合时:使用List<UserPost> userPosts传参(UserPost只有两个字段userId和postId)
<foreach item="item" index="index" collection="list" separator=",">
(#{item.userId},#{item.postId})
</foreach>