<?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.gangquan360.smartadmin.module.role.basic.RoleDao">

    <resultMap id="RoleEntity"
               type="com.gangquan360.smartadmin.module.role.basic.domain.entity.RoleEntity"></resultMap>


    <sql id="baseSql">
        r.id,
        r.role_name,
        r.remark,
        r.update_time,
        r.create_time
    </sql>


    <select id="getByRoleName" resultMap="RoleEntity">
        SELECT
        <include refid="baseSql"></include>
        FROM
        t_role r
        WHERE
        r.role_name = #{roleName}
    </select>

</mapper>