<?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.ycwl.basic.mapper.MenuMapper">
    <insert id="addRoleMenu">
        replace role_menu(`role_id`, `menu_str`, `perm_str`, `update_time`)
        values (#{id}, #{menuStr}, #{permStr}, NOW())
    </insert>
    <delete id="deleteRoleMenuByRoleId">
        delete
        from role_menu
        where role_id = #{id}
    </delete>
    <select id="getPermissionByRoleId" resultType="com.ycwl.basic.model.pc.role.resp.RolePermissionResp">
        select role_id, menu_str, perm_str
        from role_menu
        where role_id = #{id}
    </select>

</mapper>
