<?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="cn.com.countrygarden.bi.main.dao.sys.RoleMenusMapper">
  <resultMap id="BaseResultMap" type="cn.com.countrygarden.bi.main.model.sys.RoleMenus">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" jdbcType="INTEGER" property="id" />
    <result column="role_code" jdbcType="VARCHAR" property="roleCode" />
    <result column="menu_code" jdbcType="VARCHAR" property="menuCode" />
    <result column="created_date" jdbcType="TIMESTAMP" property="createdDate" javaType="java.util.Date"/>
    <result column="created_by" jdbcType="VARCHAR" property="createdBy" />
    <result column="updated_date" jdbcType="TIMESTAMP" property="updatedDate" javaType="java.util.Date"/>
    <result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
  </resultMap>

  <delete id="deleteByRoleCodes">
  DELETE FROM role_menus WHERE role_code=#{roleCode}
</delete>

  <select id="selectExistMenuCodeByRoleCode" resultType="java.lang.String">
    SELECT menu_code FROM role_menus WHERE role_code=#{roleCode}
  </select>

</mapper>