<?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.dxhy.admin.sys.dao.SysRoleMenuDao">
    <select id="queryMenuIdList" resultType="long">
        select menu_id
        from sys_role_menu
        where role_id = #{roleId}
    </select>

    <select id="getMenuList" resultType="long">
        select menu_id from sys_menu where type = 2 and menu_id in
        <foreach item="menuIds" index="index" collection="menuIds" open="(" separator="," close=")">
            #{menuIds}
        </foreach>
    </select>
    <delete id="deleteBatch">
        delete from sys_role_menu where role_id in
        <foreach item="roleIds" index="index" collection="roleIds" open="(" separator="," close=")">
            #{roleIds}
        </foreach>
    </delete>

</mapper>
