<?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.UserRefundHistoryMapper">

    <resultMap type="userRefundHistory" id="UserRefundHistoryMap">
        <result property="id" column="id" jdbcType="INTEGER"/>
        <result property="userId" column="user_id" jdbcType="INTEGER"/>
        <result property="userType" column="user_type" jdbcType="INTEGER"/>
        <result property="orderNo" column="order_no" jdbcType="VARCHAR"/>
        <result property="createTime" column="create_time" jdbcType="INTEGER"/>
        <result property="doneTime" column="done_time" jdbcType="INTEGER"/>
        <result property="remark" column="remark" jdbcType="VARCHAR"/>
        <result property="refundPrice" column="refund_price" jdbcType="DECIMAL"/>
    </resultMap>

    <sql id="Base_Column_List">
        id,
           user_id,
           user_type,
           order_no,
           create_time,
           done_time,
           refund_price,
           remark
    </sql>

    <select id="queryByOrderNo" resultMap="UserRefundHistoryMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM user_refund_history
        WHERE order_no = #{orderNo}
        LIMIT 1
    </select>

</mapper>