<?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.gov.customs.wxjy.demo.dao.AuthDao">
    <resultMap id="PermissionResultMap" type="cn.gov.customs.wxjy.demo.pojo.Permission">
        <id column="CODE" jdbcType="VARCHAR" property="code"/>
        <result column="NAME" jdbcType="VARCHAR" property="name"/>
        <result column="APP_CODE" jdbcType="VARCHAR" property="appCode"/>
    </resultMap>

    <resultMap id="RoleResultMap" type="cn.gov.customs.wxjy.demo.pojo.Role">
        <id column="CODE" jdbcType="VARCHAR" property="code"/>
        <result column="NAME" jdbcType="VARCHAR" property="name"/>
        <result column="APP_CODE" jdbcType="VARCHAR" property="appCode"/>
        <result column="RESOURCE_LEVEL" jdbcType="VARCHAR" property="resourceLevel"/>
    </resultMap>

    <select id="getPermission" resultMap="PermissionResultMap">
        SELECT *
        FROM WXJY_PERMISSION
    </select>

    <select id="getRole" resultMap="RoleResultMap">
        SELECT * FROM WXJY_ROLE
    </select>

</mapper>