<?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.hc.business.mapper.UserAdminMapper">

    <resultMap type="userAdmin" id="UserAdminMap">
        <result property="userAdminId" column="user_admin_id" jdbcType="INTEGER"/>
        <result property="adminName" column="admin_name" jdbcType="VARCHAR"/>
        <result property="adminAccount" column="admin_account" jdbcType="VARCHAR"/>
        <result property="adminPass" column="admin_pass" jdbcType="VARCHAR"/>
        <result property="permissionLevel" column="permission_level" jdbcType="INTEGER"/>
    </resultMap>

    <sql id="Base_Column_List">
        user_admin_id,
           admin_name,
           admin_account,
           admin_pass,
           permission_level
    </sql>

    <select id="selectUserAdmin" resultMap="UserAdminMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM user_admin
        WHERE admin_account = #{adminAccount,jdbcType=VARCHAR}
    </select>

</mapper>