<?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.xhpc.tradebill.mapper.XhpcRefundOrderMapper">


    <resultMap type="com.xhpc.tradebill.domain.XhpcRefundOrderDomain" id="XhpcRefundOrderResult">
        <result column="refund_order_id" property="refundOrderId"/>
        <result column="refund_order_number" property="refundOrderNumber"/>
        <result column="user_id" property="userId"/>
        <result column="open_id" property="openId"/>
        <result column="alipay_id" property="alipayId"/>
        <result column="amount" property="amount"/>
        <result column="type" property="type"/>
        <result column="examine_status" property="examineStatus"/>
        <result column="status" property="status"/>
        <result column="del_flag" property="delFlag"/>
        <result column="create_time" property="createTime"/>
        <result column="create_by" property="createBy"/>
        <result column="update_time" property="updateTime"/>
        <result column="update_by" property="updateBy"/>
        <result column="source" property="source" />
    </resultMap>

    <select id="findByOrderNumber" resultType="com.xhpc.tradebill.domain.XhpcRefundOrderDomain">
        select * from xhpc_refund_order where refund_order_number=#{orderNumber}
    </select>

    <select id="findListByOrderNumbers" resultType="map">
        select
        refund_order_id as 'id',
        refund_order_number as 'orderNumber',
        user_id as 'userId',
        amount as 'amount',
        create_time as 'createTime',
        update_time as 'updateTime'
        from xhpc_refund_order
        where refund_order_number in
        <foreach collection="orderNumbers" item="orderNumber" separator="," open="(" close=")">
            #{orderNumber}
        </foreach>
    </select>
</mapper>