|
|
@@ -0,0 +1,83 @@
|
|
|
+<?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.fs.qw.mapper.FsCompanyExternalPayRefundMapper">
|
|
|
+
|
|
|
+ <resultMap type="com.fs.qw.domain.FsCompanyExternalPayRefund" id="FsCompanyExternalPayRefundResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="transactionId" column="transaction_id" />
|
|
|
+ <result property="outTradeNo" column="out_trade_no" />
|
|
|
+ <result property="outRefundNo" column="out_refund_no" />
|
|
|
+ <result property="refundUserid" column="refund_userid" />
|
|
|
+ <result property="refundComment" column="refund_comment" />
|
|
|
+ <result property="refundReqtime" column="refund_reqtime" />
|
|
|
+ <result property="refundStatus" column="refund_status" />
|
|
|
+ <result property="refundFee" column="refund_fee" />
|
|
|
+ <result property="externalUserid" column="external_userid" />
|
|
|
+ <result property="payeeUserid" column="payee_userid" />
|
|
|
+ <result property="paymentType" column="payment_type" />
|
|
|
+ <result property="mchId" column="mch_id" />
|
|
|
+ <result property="payTime" column="pay_time" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id, transaction_id, out_trade_no, out_refund_no, refund_userid, refund_comment,
|
|
|
+ refund_reqtime, refund_status, refund_fee, external_userid, payee_userid,
|
|
|
+ payment_type, mch_id, pay_time, create_time, update_time
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <insert id="insertRefund" parameterType="com.fs.qw.domain.FsCompanyExternalPayRefund" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into fs_company_external_pay_refund
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ transaction_id, out_trade_no, out_refund_no, refund_userid, refund_comment,
|
|
|
+ refund_reqtime, refund_status, refund_fee, external_userid, payee_userid,
|
|
|
+ payment_type, mch_id, pay_time, create_time, update_time
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ #{transactionId}, #{outTradeNo}, #{outRefundNo}, #{refundUserid}, #{refundComment},
|
|
|
+ #{refundReqtime}, #{refundStatus}, #{refundFee}, #{externalUserid}, #{payeeUserid},
|
|
|
+ #{paymentType}, #{mchId}, #{payTime}, sysdate(), sysdate()
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateRefund" parameterType="com.fs.qw.domain.FsCompanyExternalPayRefund">
|
|
|
+ update fs_company_external_pay_refund
|
|
|
+ <set>
|
|
|
+ <if test="outTradeNo != null">out_trade_no = #{outTradeNo},</if>
|
|
|
+ <if test="outRefundNo != null">out_refund_no = #{outRefundNo},</if>
|
|
|
+ <if test="refundUserid != null">refund_userid = #{refundUserid},</if>
|
|
|
+ <if test="refundComment != null">refund_comment = #{refundComment},</if>
|
|
|
+ <if test="refundReqtime != null">refund_reqtime = #{refundReqtime},</if>
|
|
|
+ <if test="refundStatus != null">refund_status = #{refundStatus},</if>
|
|
|
+ <if test="refundFee != null">refund_fee = #{refundFee},</if>
|
|
|
+ <if test="externalUserid != null">external_userid = #{externalUserid},</if>
|
|
|
+ <if test="payeeUserid != null">payee_userid = #{payeeUserid},</if>
|
|
|
+ <if test="paymentType != null">payment_type = #{paymentType},</if>
|
|
|
+ <if test="mchId != null">mch_id = #{mchId},</if>
|
|
|
+ <if test="payTime != null">pay_time = #{payTime},</if>
|
|
|
+ update_time = sysdate()
|
|
|
+ </set>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="selectByTransactionId" resultMap="FsCompanyExternalPayRefundResult">
|
|
|
+ select <include refid="Base_Column_List"/> from fs_company_external_pay_refund where transaction_id = #{transactionId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectByOutRefundNo" resultMap="FsCompanyExternalPayRefundResult">
|
|
|
+ select <include refid="Base_Column_List"/> from fs_company_external_pay_refund where out_refund_no = #{outRefundNo}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectRefundList" parameterType="com.fs.qw.domain.FsCompanyExternalPayRefund" resultMap="FsCompanyExternalPayRefundResult">
|
|
|
+ select <include refid="Base_Column_List"/> from fs_company_external_pay_refund
|
|
|
+ <where>
|
|
|
+ <if test="transactionId != null and transactionId != ''">and transaction_id = #{transactionId}</if>
|
|
|
+ <if test="outTradeNo != null and outTradeNo != ''">and out_trade_no = #{outTradeNo}</if>
|
|
|
+ <if test="outRefundNo != null and outRefundNo != ''">and out_refund_no = #{outRefundNo}</if>
|
|
|
+ <if test="refundUserid != null and refundUserid != ''">and refund_userid = #{refundUserid}</if>
|
|
|
+ <if test="refundStatus != null">and refund_status = #{refundStatus}</if>
|
|
|
+ </where>
|
|
|
+ order by refund_reqtime desc
|
|
|
+ </select>
|
|
|
+</mapper>
|