支付记录加paymentId

This commit is contained in:
2024-01-19 14:47:35 +08:00
parent 64671cd421
commit 7edeb2f77c
3 changed files with 39 additions and 10 deletions

View File

@@ -35,6 +35,11 @@ public class OrderPayRecord {
*/
private BigDecimal payAmount;
/**
* 支付id
*/
private String paymentId;
/**
* 收单机构0-本账户余额1-微信支付2-汇付支付)
*/

View File

@@ -38,9 +38,5 @@ public interface OrderPayRecordMapper {
int insertOrUpdateSelective(OrderPayRecord record);
// int deleteByPrimaryKey(Integer id);
// int updateByPrimaryKey(OrderPayRecord record);
List<OrderPayRecord> getOrderPayRecordList(@Param("orderCode") String orderCode);
}

View File

@@ -8,6 +8,7 @@
<result column="order_code" jdbcType="VARCHAR" property="orderCode" />
<result column="pay_mode" jdbcType="VARCHAR" property="payMode" />
<result column="pay_amount" jdbcType="DECIMAL" property="payAmount" />
<result column="payment_id" jdbcType="VARCHAR" property="paymentId" />
<result column="acquirer" jdbcType="VARCHAR" property="acquirer" />
<result column="refund_amount" jdbcType="DECIMAL" property="refundAmount" />
<result column="deduction_record" jdbcType="VARCHAR" property="deductionRecord" />
@@ -19,7 +20,7 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, order_code, pay_mode, pay_amount, acquirer, refund_amount, deduction_record,
id, order_code, pay_mode, pay_amount, payment_id, acquirer, refund_amount, deduction_record,
create_by, create_time, update_by, update_time, del_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
@@ -42,6 +43,9 @@
<if test="payAmount != null">
pay_amount,
</if>
<if test="paymentId != null">
payment_id,
</if>
<if test="acquirer != null">
acquirer,
</if>
@@ -77,6 +81,9 @@
<if test="payAmount != null">
#{payAmount,jdbcType=DECIMAL},
</if>
<if test="paymentId != null">
#{paymentId,jdbcType=VARCHAR},
</if>
<if test="acquirer != null">
#{acquirer,jdbcType=VARCHAR},
</if>
@@ -116,6 +123,9 @@
<if test="payAmount != null">
pay_amount = #{payAmount,jdbcType=DECIMAL},
</if>
<if test="paymentId != null">
payment_id = #{paymentId,jdbcType=VARCHAR},
</if>
<if test="acquirer != null">
acquirer = #{acquirer,jdbcType=VARCHAR},
</if>
@@ -162,6 +172,11 @@
when id = #{item.id,jdbcType=INTEGER} then #{item.payAmount,jdbcType=DECIMAL}
</foreach>
</trim>
<trim prefix="payment_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.paymentId,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="acquirer = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.acquirer,jdbcType=VARCHAR}
@@ -211,14 +226,15 @@
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into order_pay_record
(order_code, pay_mode, pay_amount, acquirer, refund_amount, deduction_record, create_by,
create_time, update_by, update_time, del_flag)
(order_code, pay_mode, pay_amount, payment_id, acquirer, refund_amount, deduction_record,
create_by, create_time, update_by, update_time, del_flag)
values
<foreach collection="list" item="item" separator=",">
(#{item.orderCode,jdbcType=VARCHAR}, #{item.payMode,jdbcType=VARCHAR}, #{item.payAmount,jdbcType=DECIMAL},
#{item.acquirer,jdbcType=VARCHAR}, #{item.refundAmount,jdbcType=DECIMAL}, #{item.deductionRecord,jdbcType=VARCHAR},
#{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR},
#{item.updateTime,jdbcType=TIMESTAMP}, #{item.delFlag,jdbcType=CHAR})
#{item.paymentId,jdbcType=VARCHAR}, #{item.acquirer,jdbcType=VARCHAR}, #{item.refundAmount,jdbcType=DECIMAL},
#{item.deductionRecord,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
#{item.updateBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.delFlag,jdbcType=CHAR}
)
</foreach>
</insert>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.OrderPayRecord" useGeneratedKeys="true">
@@ -231,6 +247,7 @@
order_code,
pay_mode,
pay_amount,
payment_id,
acquirer,
refund_amount,
deduction_record,
@@ -248,6 +265,7 @@
#{orderCode,jdbcType=VARCHAR},
#{payMode,jdbcType=VARCHAR},
#{payAmount,jdbcType=DECIMAL},
#{paymentId,jdbcType=VARCHAR},
#{acquirer,jdbcType=VARCHAR},
#{refundAmount,jdbcType=DECIMAL},
#{deductionRecord,jdbcType=VARCHAR},
@@ -265,6 +283,7 @@
order_code = #{orderCode,jdbcType=VARCHAR},
pay_mode = #{payMode,jdbcType=VARCHAR},
pay_amount = #{payAmount,jdbcType=DECIMAL},
payment_id = #{paymentId,jdbcType=VARCHAR},
acquirer = #{acquirer,jdbcType=VARCHAR},
refund_amount = #{refundAmount,jdbcType=DECIMAL},
deduction_record = #{deductionRecord,jdbcType=VARCHAR},
@@ -291,6 +310,9 @@
<if test="payAmount != null">
pay_amount,
</if>
<if test="paymentId != null">
payment_id,
</if>
<if test="acquirer != null">
acquirer,
</if>
@@ -330,6 +352,9 @@
<if test="payAmount != null">
#{payAmount,jdbcType=DECIMAL},
</if>
<if test="paymentId != null">
#{paymentId,jdbcType=VARCHAR},
</if>
<if test="acquirer != null">
#{acquirer,jdbcType=VARCHAR},
</if>
@@ -369,6 +394,9 @@
<if test="payAmount != null">
pay_amount = #{payAmount,jdbcType=DECIMAL},
</if>
<if test="paymentId != null">
payment_id = #{paymentId,jdbcType=VARCHAR},
</if>
<if test="acquirer != null">
acquirer = #{acquirer,jdbcType=VARCHAR},
</if>