<?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.UserOrderPaymentDao">
    <resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.UserOrderPayment">
        <result column="id_" property="id" />

        <result column="open_type_" property="openType" />
        <result column="payment_client_" property="paymentClient" />
        <result column="pay_channel_" property="payChannel" />

        <result column="order_no_" property="orderNo" />
        <result column="payment_no_" property="paymentNo" />
        <result column="trans_no_" property="transNo" />
        <result column="pay_channel_" property="payChannel" />
        <result column="pay_amt_" property="payAmt" />
        <result column="back_pay_amt_" property="backPayAmt" />
        <result column="fee_amt_" property="feeAmt" />
        <result column="pay_info_" property="payInfo" />
        <result column="status_" property="status" />
        <result column="pay_fail_msg_" property="payFailMsg" />
        <result column="arrival_time_" property="arrivalTime" />
        <result column="close_status_" property="closeStatus" />
        <result column="close_fail_msg_" property="closeFailMsg" />
        <result column="create_time_" property="createTime" />
        <result column="update_time_" property="updateTime" />
    </resultMap>

    <!-- 表字段 -->
    <sql id="baseColumns">
         t.id_ as id
        , t.open_type_ as openType,
        , t.payment_client_ as paymentClient,
        , t.pay_channel_ as payChannel,
        , t.order_no_ as orderNo
        , t.payment_no_ as paymentNo
        , t.trans_no_ as transNo
        , t.pay_channel_ as payChannel
        , t.pay_amt_ as payAmt
        , t.back_pay_amt_ as backPayAmt
        , t.fee_amt_ as feeAmt
        , t.pay_info_ as payInfo
        , t.status_ as status
        , t.pay_fail_msg_ as payFailMsg
        , t.arrival_time_ as arrivalTime
        , close_status_ as closeStatus
        , close_fail_msg_ as closeFailMsg
        , t.create_time_ as createTime
        , t.update_time_ as updateTime
        </sql>

    <select id="detail" resultType="com.yonge.cooleshow.biz.dal.vo.UserOrderPaymentVo">
        SELECT
        <include refid="baseColumns"/>
        FROM user_order_payment t
        where t.id_ = #{id}
    </select>

    <select id="selectPage" resultType="com.yonge.cooleshow.biz.dal.vo.UserOrderPaymentVo">
        SELECT
        <include refid="baseColumns" />
        FROM user_order_payment t
    </select>
</mapper>