<?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.yonge.cooleshow.biz.dal.dao.TeacherTotalDao">
	<resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.TeacherTotal">
            <result column="user_id_" property="userId" />
	        <result column="star_grade_" property="starGrade" />
	        <result column="fans_num_" property="fansNum" />
	        <result column="exp_time_" property="expTime" />
	        <result column="un_exp_time_" property="unExpTime" />
	        <result column="live_flag_" property="liveFlag" />
	        <result column="update_time_" property="updateTime" />
		</resultMap>  
    
    <!-- 表字段 -->
    <sql id="baseColumns">
         t.user_id_ as userId
        , t.star_grade_ as starGrade
        , t.fans_num_ as fansNum
        , t.exp_time_ as expTime
        , t.un_exp_time_ as unExpTime
        , t.live_flag_ as liveFlag
        , t.update_time_ as updateTime
        </sql> 
    
    <select id="detail" resultType="com.yonge.cooleshow.biz.dal.vo.TeacherTotalVo">
        SELECT
            <include refid="baseColumns"/>
        FROM teacher_total t
        where t.user_id_ = #{id}
    </select>
    
    <select id="selectPage" resultType="com.yonge.cooleshow.biz.dal.vo.TeacherTotalVo">
		SELECT         
        	<include refid="baseColumns" />
		FROM teacher_total t
	</select>
</mapper>