|
@@ -19,25 +19,55 @@
|
|
|
<result property="payTime" column="pay_time" />
|
|
<result property="payTime" column="pay_time" />
|
|
|
<result property="createTime" column="create_time" />
|
|
<result property="createTime" column="create_time" />
|
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
|
+ <result property="corpId" column="corp_id" />
|
|
|
|
|
+ <result property="corpName" column="corp_name" />
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
<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
|
|
|
|
|
|
|
+ select 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, corp_id, corp_name
|
|
|
|
|
+ from fs_company_external_pay_refund
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
+ <!-- 动态插入:仅插入非 NULL 字段 -->
|
|
|
<insert id="insertRefund" parameterType="com.fs.qw.domain.FsCompanyExternalPayRefund" useGeneratedKeys="true" keyProperty="id">
|
|
<insert id="insertRefund" parameterType="com.fs.qw.domain.FsCompanyExternalPayRefund" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into fs_company_external_pay_refund
|
|
insert into fs_company_external_pay_refund
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<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
|
|
|
|
|
|
|
+ <if test="transactionId != null">transaction_id,</if>
|
|
|
|
|
+ <if test="outTradeNo != null">out_trade_no,</if>
|
|
|
|
|
+ <if test="outRefundNo != null">out_refund_no,</if>
|
|
|
|
|
+ <if test="refundUserid != null">refund_userid,</if>
|
|
|
|
|
+ <if test="refundComment != null">refund_comment,</if>
|
|
|
|
|
+ <if test="refundReqtime != null">refund_reqtime,</if>
|
|
|
|
|
+ <if test="refundStatus != null">refund_status,</if>
|
|
|
|
|
+ <if test="refundFee != null">refund_fee,</if>
|
|
|
|
|
+ <if test="externalUserid != null">external_userid,</if>
|
|
|
|
|
+ <if test="payeeUserid != null">payee_userid,</if>
|
|
|
|
|
+ <if test="paymentType != null">payment_type,</if>
|
|
|
|
|
+ <if test="mchId != null">mch_id,</if>
|
|
|
|
|
+ <if test="payTime != null">pay_time,</if>
|
|
|
|
|
+ <if test="corpId != null">corp_id,</if>
|
|
|
|
|
+ <if test="corpName != null">corp_name,</if>
|
|
|
|
|
+ create_time, update_time
|
|
|
</trim>
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- #{transactionId}, #{outTradeNo}, #{outRefundNo}, #{refundUserid}, #{refundComment},
|
|
|
|
|
- #{refundReqtime}, #{refundStatus}, #{refundFee}, #{externalUserid}, #{payeeUserid},
|
|
|
|
|
- #{paymentType}, #{mchId}, #{payTime}, sysdate(), sysdate()
|
|
|
|
|
|
|
+ <if test="transactionId != null">#{transactionId},</if>
|
|
|
|
|
+ <if test="outTradeNo != null">#{outTradeNo},</if>
|
|
|
|
|
+ <if test="outRefundNo != null">#{outRefundNo},</if>
|
|
|
|
|
+ <if test="refundUserid != null">#{refundUserid},</if>
|
|
|
|
|
+ <if test="refundComment != null">#{refundComment},</if>
|
|
|
|
|
+ <if test="refundReqtime != null">#{refundReqtime},</if>
|
|
|
|
|
+ <if test="refundStatus != null">#{refundStatus},</if>
|
|
|
|
|
+ <if test="refundFee != null">#{refundFee},</if>
|
|
|
|
|
+ <if test="externalUserid != null">#{externalUserid},</if>
|
|
|
|
|
+ <if test="payeeUserid != null">#{payeeUserid},</if>
|
|
|
|
|
+ <if test="paymentType != null">#{paymentType},</if>
|
|
|
|
|
+ <if test="mchId != null">#{mchId},</if>
|
|
|
|
|
+ <if test="payTime != null">#{payTime},</if>
|
|
|
|
|
+ <if test="corpId != null">#{corpId},</if>
|
|
|
|
|
+ <if test="corpName != null">#{corpName},</if>
|
|
|
|
|
+ sysdate(), sysdate()
|
|
|
</trim>
|
|
</trim>
|
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
@@ -56,21 +86,23 @@
|
|
|
<if test="paymentType != null">payment_type = #{paymentType},</if>
|
|
<if test="paymentType != null">payment_type = #{paymentType},</if>
|
|
|
<if test="mchId != null">mch_id = #{mchId},</if>
|
|
<if test="mchId != null">mch_id = #{mchId},</if>
|
|
|
<if test="payTime != null">pay_time = #{payTime},</if>
|
|
<if test="payTime != null">pay_time = #{payTime},</if>
|
|
|
|
|
+ <if test="corpId != null">corp_id = #{corpId},</if>
|
|
|
|
|
+ <if test="corpName != null">corp_name = #{corpName},</if>
|
|
|
update_time = sysdate()
|
|
update_time = sysdate()
|
|
|
</set>
|
|
</set>
|
|
|
where id = #{id}
|
|
where id = #{id}
|
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
|
<select id="selectByTransactionId" resultMap="FsCompanyExternalPayRefundResult">
|
|
<select id="selectByTransactionId" resultMap="FsCompanyExternalPayRefundResult">
|
|
|
- select <include refid="Base_Column_List"/> from fs_company_external_pay_refund where transaction_id = #{transactionId}
|
|
|
|
|
|
|
+ <include refid="Base_Column_List"/> where transaction_id = #{transactionId}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectByOutRefundNo" resultMap="FsCompanyExternalPayRefundResult">
|
|
<select id="selectByOutRefundNo" resultMap="FsCompanyExternalPayRefundResult">
|
|
|
- select <include refid="Base_Column_List"/> from fs_company_external_pay_refund where out_refund_no = #{outRefundNo}
|
|
|
|
|
|
|
+ <include refid="Base_Column_List"/> where out_refund_no = #{outRefundNo}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectRefundList" parameterType="com.fs.qw.domain.FsCompanyExternalPayRefund" resultMap="FsCompanyExternalPayRefundResult">
|
|
<select id="selectRefundList" parameterType="com.fs.qw.domain.FsCompanyExternalPayRefund" resultMap="FsCompanyExternalPayRefundResult">
|
|
|
- select <include refid="Base_Column_List"/> from fs_company_external_pay_refund
|
|
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
<where>
|
|
<where>
|
|
|
<if test="transactionId != null and transactionId != ''">and transaction_id = #{transactionId}</if>
|
|
<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="outTradeNo != null and outTradeNo != ''">and out_trade_no = #{outTradeNo}</if>
|