<?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.zm.order.tool.server.tempdb.OrderBaoZhuPayDao">

    <resultMap id="JuiceOrderMap" type="com.zm.order.tool.server.model.OrderBaoZhuPay">
        <id column="id" jdbcType="BIGINT" property="id"/>
        <result column="order_no" jdbcType="VARCHAR" property="orderNo"/>
        <result column="pay_status_txt" jdbcType="VARCHAR" property="payStatusTxt"/>
        <result column="pay_at" jdbcType="VARCHAR" property="payAt"/>
        <result column="pay_source" jdbcType="VARCHAR" property="paySource"/>
        <result column="pay_type" jdbcType="VARCHAR" property="payType"/>
        <result column="amount" jdbcType="DECIMAL" property="amount"/>
        <result column="shop_no" jdbcType="VARCHAR" property="shopNo"/>
        <result column="pay_no" jdbcType="VARCHAR" property="payNo"/>
    </resultMap>

    <sql id="tb">
        order_baozhu_pay
    </sql>

    <sql id="cols_all">
        id,
        order_no,
        pay_status_txt,
        pay_at,
        pay_source,
        pay_type,
        amount,
        shop_no,
        pay_no
    </sql>

    <select id="selectByOrderNo" parameterType="map" resultMap="JuiceOrderMap">
        select
        <include refid="cols_all"/>
        from
        <include refid="tb"/>
        where
        order_no = #{orderNo} and pay_status_txt = #{payStatusTxt}
    </select>
</mapper>