<?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.PianoRoomBuyRecordDao">
	<resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.PianoRoomBuyRecord">
            <result column="id_" property="id" />
	        <result column="user_id_" property="userId" />
	        <result column="settings_id_" property="settingsId" />
	        <result column="order_no_" property="orderNo" />
	        <result column="sub_order_no_" property="subOrderNo" />
	        <result column="times_" property="times" />
	        <result column="create_time_" property="createTime" />
	        <result column="update_time_" property="updateTime" />
		</resultMap>  
    
    <!-- 表字段 -->
    <sql id="baseColumns">
         t.id_ as id
        , t.user_id_ as userId
        , t.settings_id_ as settingsId
        , t.order_no_ as orderNo
        , t.sub_order_no_ as subOrderNo
        , t.times_ as times
        , t.create_time_ as createTime
        , t.update_time_ as updateTime
        </sql> 
    
    <select id="detail" resultType="com.yonge.cooleshow.biz.dal.vo.PianoRoomBuyRecordVo">
        SELECT
            <include refid="baseColumns"/>
        FROM piano_room_buy_record t
        where t.id_ = #{id}
    </select>
    
    <select id="selectPage" resultType="com.yonge.cooleshow.biz.dal.vo.PianoRoomBuyRecordVo">
		SELECT         
        	<include refid="baseColumns" />
		FROM piano_room_buy_record t
	</select>
</mapper>