mapper.java
int deleteRelationsByRoleids(@Param("roleids") Integer[] roleids);
mapper.xml
<delete id="deleteRelationsByRoleids">
DELETE FROM user_role
WHERE
role_id in
<foreach collection="roleids" item="item" index="index" open="(" separator="," close=")">
#{item,jdbcType=INTEGER}
</foreach>
</delete>