<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
		"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.ruoyi.system.mapper.SysRoleDeptMapper">

	<resultMap type="com.ruoyi.system.domain.SysRoleDept" id="SysRoleDeptResult">
		<result property="roleId"     column="role_id"      />
		<result property="deptId"     column="dept_id"      />
	</resultMap>

	<delete id="deleteRoleDeptByRoleId" parameterType="java.lang.Long">
		DELETE FROM sys_role_dept
		WHERE role_id = #{roleId}
	</delete>

	<delete id="deleteRoleDept">
		DELETE FROM sys_role_dept
		WHERE role_id IN
		<foreach collection="array" item="roleId" open="(" separator="," close=")">
			#{roleId}
		</foreach>
	</delete>

</mapper>