<?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.xingxi.api.data.mapper.WxApiPaymentInfoMapper">

    <sql id="selectPaymentInfoVo">
        select
            payId, orderId, orderNo, orderStatus, payTime, payKind, sellerId, combineAppid, combineMchid, deviceId,
            payerClientIp, mchid, outTradeNo, subMchid, subAttach, subDescription, payAmount, subCurrency,
            profitSharing, wxOpenId, notifyUrl, stateCode, prepayId, tradeType, tradeState, bankType, successTime,
            transactionId, wxOrderId, wxOrderStatus, delFlag, createUser, createTime, updateUser, updateTime
        from t_payment_info
    </sql>

    <select id="selectPaymentInfoByOutTradeNo" parameterType="String" resultType="PaymentInfo">
        <include refid="selectPaymentInfoVo"/>
        where out_trade_no = #{outTradeNo} and del_flag = '0'
        limit 1
    </select>

</mapper>
