|
|
|
|
@@ -0,0 +1,701 @@
|
|
|
|
|
<?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.jsowell.pile.mapper.AdapayUnsplitRecordMapper">
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.jsowell.pile.domain.AdapayUnsplitRecord">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
<!--@Table adapay_unsplit_record-->
|
|
|
|
|
<id column="id" jdbcType="INTEGER" property="id" />
|
|
|
|
|
<result column="merchant_code" jdbcType="VARCHAR" property="merchantCode" />
|
|
|
|
|
<result column="pay_time" jdbcType="TIMESTAMP" property="payTime" />
|
|
|
|
|
<result column="payment_id" jdbcType="VARCHAR" property="paymentId" />
|
|
|
|
|
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
|
|
|
|
|
<result column="pay_amount" jdbcType="DECIMAL" property="payAmount" />
|
|
|
|
|
<result column="confirmed_split_amount" jdbcType="DECIMAL" property="confirmedSplitAmount" />
|
|
|
|
|
<result column="refund_amount" jdbcType="DECIMAL" property="refundAmount" />
|
|
|
|
|
<result column="payment_revoke_amount" jdbcType="DECIMAL" property="paymentRevokeAmount" />
|
|
|
|
|
<result column="remaining_split_amount" jdbcType="DECIMAL" property="remainingSplitAmount" />
|
|
|
|
|
<result column="order_code" jdbcType="VARCHAR" property="orderCode" />
|
|
|
|
|
<result column="pile_type" jdbcType="VARCHAR" property="pileType" />
|
|
|
|
|
<result column="due_refund_amount" jdbcType="DECIMAL" property="dueRefundAmount" />
|
|
|
|
|
<result column="settle_amount" jdbcType="DECIMAL" property="settleAmount" />
|
|
|
|
|
<result column="refund_flag" jdbcType="VARCHAR" property="refundFlag" />
|
|
|
|
|
<result column="split_flag" jdbcType="VARCHAR" property="splitFlag" />
|
|
|
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
id, merchant_code, pay_time, payment_id, order_no, pay_amount, confirmed_split_amount,
|
|
|
|
|
refund_amount, payment_revoke_amount, remaining_split_amount, order_code, pile_type,
|
|
|
|
|
due_refund_amount, settle_amount, refund_flag, split_flag, update_time
|
|
|
|
|
</sql>
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
select
|
|
|
|
|
<include refid="Base_Column_List" />
|
|
|
|
|
from adapay_unsplit_record
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</select>
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
delete from adapay_unsplit_record
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</delete>
|
|
|
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.AdapayUnsplitRecord" useGeneratedKeys="true">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
insert into adapay_unsplit_record (merchant_code, pay_time, payment_id,
|
|
|
|
|
order_no, pay_amount, confirmed_split_amount,
|
|
|
|
|
refund_amount, payment_revoke_amount, remaining_split_amount,
|
|
|
|
|
order_code, pile_type, due_refund_amount,
|
|
|
|
|
settle_amount, refund_flag, split_flag,
|
|
|
|
|
update_time)
|
|
|
|
|
values (#{merchantCode,jdbcType=VARCHAR}, #{payTime,jdbcType=TIMESTAMP}, #{paymentId,jdbcType=VARCHAR},
|
|
|
|
|
#{orderNo,jdbcType=VARCHAR}, #{payAmount,jdbcType=DECIMAL}, #{confirmedSplitAmount,jdbcType=DECIMAL},
|
|
|
|
|
#{refundAmount,jdbcType=DECIMAL}, #{paymentRevokeAmount,jdbcType=DECIMAL}, #{remainingSplitAmount,jdbcType=DECIMAL},
|
|
|
|
|
#{orderCode,jdbcType=VARCHAR}, #{pileType,jdbcType=VARCHAR}, #{dueRefundAmount,jdbcType=DECIMAL},
|
|
|
|
|
#{settleAmount,jdbcType=DECIMAL}, #{refundFlag,jdbcType=VARCHAR}, #{splitFlag,jdbcType=VARCHAR},
|
|
|
|
|
#{updateTime,jdbcType=TIMESTAMP})
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.AdapayUnsplitRecord" useGeneratedKeys="true">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
insert into adapay_unsplit_record
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="merchantCode != null">
|
|
|
|
|
merchant_code,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="payTime != null">
|
|
|
|
|
pay_time,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="paymentId != null">
|
|
|
|
|
payment_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderNo != null">
|
|
|
|
|
order_no,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="payAmount != null">
|
|
|
|
|
pay_amount,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="confirmedSplitAmount != null">
|
|
|
|
|
confirmed_split_amount,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="refundAmount != null">
|
|
|
|
|
refund_amount,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="paymentRevokeAmount != null">
|
|
|
|
|
payment_revoke_amount,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="remainingSplitAmount != null">
|
|
|
|
|
remaining_split_amount,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderCode != null">
|
|
|
|
|
order_code,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="pileType != null">
|
|
|
|
|
pile_type,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dueRefundAmount != null">
|
|
|
|
|
due_refund_amount,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="settleAmount != null">
|
|
|
|
|
settle_amount,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="refundFlag != null">
|
|
|
|
|
refund_flag,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="splitFlag != null">
|
|
|
|
|
split_flag,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
update_time,
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="merchantCode != null">
|
|
|
|
|
#{merchantCode,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="payTime != null">
|
|
|
|
|
#{payTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="paymentId != null">
|
|
|
|
|
#{paymentId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderNo != null">
|
|
|
|
|
#{orderNo,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="payAmount != null">
|
|
|
|
|
#{payAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="confirmedSplitAmount != null">
|
|
|
|
|
#{confirmedSplitAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="refundAmount != null">
|
|
|
|
|
#{refundAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="paymentRevokeAmount != null">
|
|
|
|
|
#{paymentRevokeAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="remainingSplitAmount != null">
|
|
|
|
|
#{remainingSplitAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderCode != null">
|
|
|
|
|
#{orderCode,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="pileType != null">
|
|
|
|
|
#{pileType,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dueRefundAmount != null">
|
|
|
|
|
#{dueRefundAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="settleAmount != null">
|
|
|
|
|
#{settleAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="refundFlag != null">
|
|
|
|
|
#{refundFlag,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="splitFlag != null">
|
|
|
|
|
#{splitFlag,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.jsowell.pile.domain.AdapayUnsplitRecord">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
update adapay_unsplit_record
|
|
|
|
|
<set>
|
|
|
|
|
<if test="merchantCode != null">
|
|
|
|
|
merchant_code = #{merchantCode,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="payTime != null">
|
|
|
|
|
pay_time = #{payTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="paymentId != null">
|
|
|
|
|
payment_id = #{paymentId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderNo != null">
|
|
|
|
|
order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="payAmount != null">
|
|
|
|
|
pay_amount = #{payAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="confirmedSplitAmount != null">
|
|
|
|
|
confirmed_split_amount = #{confirmedSplitAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="refundAmount != null">
|
|
|
|
|
refund_amount = #{refundAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="paymentRevokeAmount != null">
|
|
|
|
|
payment_revoke_amount = #{paymentRevokeAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="remainingSplitAmount != null">
|
|
|
|
|
remaining_split_amount = #{remainingSplitAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderCode != null">
|
|
|
|
|
order_code = #{orderCode,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="pileType != null">
|
|
|
|
|
pile_type = #{pileType,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dueRefundAmount != null">
|
|
|
|
|
due_refund_amount = #{dueRefundAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="settleAmount != null">
|
|
|
|
|
settle_amount = #{settleAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="refundFlag != null">
|
|
|
|
|
refund_flag = #{refundFlag,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="splitFlag != null">
|
|
|
|
|
split_flag = #{splitFlag,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
</set>
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateByPrimaryKey" parameterType="com.jsowell.pile.domain.AdapayUnsplitRecord">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
update adapay_unsplit_record
|
|
|
|
|
set merchant_code = #{merchantCode,jdbcType=VARCHAR},
|
|
|
|
|
pay_time = #{payTime,jdbcType=TIMESTAMP},
|
|
|
|
|
payment_id = #{paymentId,jdbcType=VARCHAR},
|
|
|
|
|
order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
|
|
pay_amount = #{payAmount,jdbcType=DECIMAL},
|
|
|
|
|
confirmed_split_amount = #{confirmedSplitAmount,jdbcType=DECIMAL},
|
|
|
|
|
refund_amount = #{refundAmount,jdbcType=DECIMAL},
|
|
|
|
|
payment_revoke_amount = #{paymentRevokeAmount,jdbcType=DECIMAL},
|
|
|
|
|
remaining_split_amount = #{remainingSplitAmount,jdbcType=DECIMAL},
|
|
|
|
|
order_code = #{orderCode,jdbcType=VARCHAR},
|
|
|
|
|
pile_type = #{pileType,jdbcType=VARCHAR},
|
|
|
|
|
due_refund_amount = #{dueRefundAmount,jdbcType=DECIMAL},
|
|
|
|
|
settle_amount = #{settleAmount,jdbcType=DECIMAL},
|
|
|
|
|
refund_flag = #{refundFlag,jdbcType=VARCHAR},
|
|
|
|
|
split_flag = #{splitFlag,jdbcType=VARCHAR},
|
|
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
|
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateBatch" parameterType="java.util.List">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
update adapay_unsplit_record
|
|
|
|
|
<trim prefix="set" suffixOverrides=",">
|
|
|
|
|
<trim prefix="merchant_code = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.merchantCode,jdbcType=VARCHAR}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="pay_time = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.payTime,jdbcType=TIMESTAMP}
|
|
|
|
|
</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="order_no = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.orderNo,jdbcType=VARCHAR}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="pay_amount = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.payAmount,jdbcType=DECIMAL}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="confirmed_split_amount = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.confirmedSplitAmount,jdbcType=DECIMAL}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="refund_amount = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.refundAmount,jdbcType=DECIMAL}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="payment_revoke_amount = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.paymentRevokeAmount,jdbcType=DECIMAL}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="remaining_split_amount = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.remainingSplitAmount,jdbcType=DECIMAL}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="order_code = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.orderCode,jdbcType=VARCHAR}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="pile_type = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.pileType,jdbcType=VARCHAR}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="due_refund_amount = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.dueRefundAmount,jdbcType=DECIMAL}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="settle_amount = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.settleAmount,jdbcType=DECIMAL}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="refund_flag = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.refundFlag,jdbcType=VARCHAR}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="split_flag = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.splitFlag,jdbcType=VARCHAR}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="update_time = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
</trim>
|
|
|
|
|
where id in
|
|
|
|
|
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
|
|
|
|
#{item.id,jdbcType=INTEGER}
|
|
|
|
|
</foreach>
|
|
|
|
|
</update>
|
|
|
|
|
<update id="updateBatchSelective" parameterType="java.util.List">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
update adapay_unsplit_record
|
|
|
|
|
<trim prefix="set" suffixOverrides=",">
|
|
|
|
|
<trim prefix="merchant_code = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.merchantCode != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.merchantCode,jdbcType=VARCHAR}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="pay_time = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.payTime != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.payTime,jdbcType=TIMESTAMP}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="payment_id = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.paymentId != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.paymentId,jdbcType=VARCHAR}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="order_no = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.orderNo != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.orderNo,jdbcType=VARCHAR}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="pay_amount = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.payAmount != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.payAmount,jdbcType=DECIMAL}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="confirmed_split_amount = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.confirmedSplitAmount != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.confirmedSplitAmount,jdbcType=DECIMAL}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="refund_amount = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.refundAmount != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.refundAmount,jdbcType=DECIMAL}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="payment_revoke_amount = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.paymentRevokeAmount != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.paymentRevokeAmount,jdbcType=DECIMAL}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="remaining_split_amount = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.remainingSplitAmount != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.remainingSplitAmount,jdbcType=DECIMAL}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="order_code = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.orderCode != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.orderCode,jdbcType=VARCHAR}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="pile_type = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.pileType != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.pileType,jdbcType=VARCHAR}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="due_refund_amount = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.dueRefundAmount != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.dueRefundAmount,jdbcType=DECIMAL}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="settle_amount = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.settleAmount != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.settleAmount,jdbcType=DECIMAL}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="refund_flag = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.refundFlag != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.refundFlag,jdbcType=VARCHAR}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="split_flag = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.splitFlag != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.splitFlag,jdbcType=VARCHAR}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="update_time = case" suffix="end,">
|
|
|
|
|
<foreach collection="list" index="index" item="item">
|
|
|
|
|
<if test="item.updateTime != null">
|
|
|
|
|
when id = #{item.id,jdbcType=INTEGER} then #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
|
|
</if>
|
|
|
|
|
</foreach>
|
|
|
|
|
</trim>
|
|
|
|
|
</trim>
|
|
|
|
|
where id in
|
|
|
|
|
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
|
|
|
|
#{item.id,jdbcType=INTEGER}
|
|
|
|
|
</foreach>
|
|
|
|
|
</update>
|
|
|
|
|
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
insert into adapay_unsplit_record
|
|
|
|
|
(merchant_code, pay_time, payment_id, order_no, pay_amount, confirmed_split_amount,
|
|
|
|
|
refund_amount, payment_revoke_amount, remaining_split_amount, order_code, pile_type,
|
|
|
|
|
due_refund_amount, settle_amount, refund_flag, split_flag, update_time)
|
|
|
|
|
values
|
|
|
|
|
<foreach collection="list" item="item" separator=",">
|
|
|
|
|
(#{item.merchantCode,jdbcType=VARCHAR}, #{item.payTime,jdbcType=TIMESTAMP}, #{item.paymentId,jdbcType=VARCHAR},
|
|
|
|
|
#{item.orderNo,jdbcType=VARCHAR}, #{item.payAmount,jdbcType=DECIMAL}, #{item.confirmedSplitAmount,jdbcType=DECIMAL},
|
|
|
|
|
#{item.refundAmount,jdbcType=DECIMAL}, #{item.paymentRevokeAmount,jdbcType=DECIMAL},
|
|
|
|
|
#{item.remainingSplitAmount,jdbcType=DECIMAL}, #{item.orderCode,jdbcType=VARCHAR},
|
|
|
|
|
#{item.pileType,jdbcType=VARCHAR}, #{item.dueRefundAmount,jdbcType=DECIMAL}, #{item.settleAmount,jdbcType=DECIMAL},
|
|
|
|
|
#{item.refundFlag,jdbcType=VARCHAR}, #{item.splitFlag,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}
|
|
|
|
|
)
|
|
|
|
|
</foreach>
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.AdapayUnsplitRecord" useGeneratedKeys="true">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
insert into adapay_unsplit_record
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
id,
|
|
|
|
|
</if>
|
|
|
|
|
merchant_code,
|
|
|
|
|
pay_time,
|
|
|
|
|
payment_id,
|
|
|
|
|
order_no,
|
|
|
|
|
pay_amount,
|
|
|
|
|
confirmed_split_amount,
|
|
|
|
|
refund_amount,
|
|
|
|
|
payment_revoke_amount,
|
|
|
|
|
remaining_split_amount,
|
|
|
|
|
order_code,
|
|
|
|
|
pile_type,
|
|
|
|
|
due_refund_amount,
|
|
|
|
|
settle_amount,
|
|
|
|
|
refund_flag,
|
|
|
|
|
split_flag,
|
|
|
|
|
update_time,
|
|
|
|
|
</trim>
|
|
|
|
|
values
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
#{id,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
#{merchantCode,jdbcType=VARCHAR},
|
|
|
|
|
#{payTime,jdbcType=TIMESTAMP},
|
|
|
|
|
#{paymentId,jdbcType=VARCHAR},
|
|
|
|
|
#{orderNo,jdbcType=VARCHAR},
|
|
|
|
|
#{payAmount,jdbcType=DECIMAL},
|
|
|
|
|
#{confirmedSplitAmount,jdbcType=DECIMAL},
|
|
|
|
|
#{refundAmount,jdbcType=DECIMAL},
|
|
|
|
|
#{paymentRevokeAmount,jdbcType=DECIMAL},
|
|
|
|
|
#{remainingSplitAmount,jdbcType=DECIMAL},
|
|
|
|
|
#{orderCode,jdbcType=VARCHAR},
|
|
|
|
|
#{pileType,jdbcType=VARCHAR},
|
|
|
|
|
#{dueRefundAmount,jdbcType=DECIMAL},
|
|
|
|
|
#{settleAmount,jdbcType=DECIMAL},
|
|
|
|
|
#{refundFlag,jdbcType=VARCHAR},
|
|
|
|
|
#{splitFlag,jdbcType=VARCHAR},
|
|
|
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</trim>
|
|
|
|
|
on duplicate key update
|
|
|
|
|
<trim suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
id = #{id,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
merchant_code = #{merchantCode,jdbcType=VARCHAR},
|
|
|
|
|
pay_time = #{payTime,jdbcType=TIMESTAMP},
|
|
|
|
|
payment_id = #{paymentId,jdbcType=VARCHAR},
|
|
|
|
|
order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
|
|
pay_amount = #{payAmount,jdbcType=DECIMAL},
|
|
|
|
|
confirmed_split_amount = #{confirmedSplitAmount,jdbcType=DECIMAL},
|
|
|
|
|
refund_amount = #{refundAmount,jdbcType=DECIMAL},
|
|
|
|
|
payment_revoke_amount = #{paymentRevokeAmount,jdbcType=DECIMAL},
|
|
|
|
|
remaining_split_amount = #{remainingSplitAmount,jdbcType=DECIMAL},
|
|
|
|
|
order_code = #{orderCode,jdbcType=VARCHAR},
|
|
|
|
|
pile_type = #{pileType,jdbcType=VARCHAR},
|
|
|
|
|
due_refund_amount = #{dueRefundAmount,jdbcType=DECIMAL},
|
|
|
|
|
settle_amount = #{settleAmount,jdbcType=DECIMAL},
|
|
|
|
|
refund_flag = #{refundFlag,jdbcType=VARCHAR},
|
|
|
|
|
split_flag = #{splitFlag,jdbcType=VARCHAR},
|
|
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.AdapayUnsplitRecord" useGeneratedKeys="true">
|
|
|
|
|
<!--@mbg.generated-->
|
|
|
|
|
insert into adapay_unsplit_record
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="merchantCode != null">
|
|
|
|
|
merchant_code,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="payTime != null">
|
|
|
|
|
pay_time,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="paymentId != null">
|
|
|
|
|
payment_id,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderNo != null">
|
|
|
|
|
order_no,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="payAmount != null">
|
|
|
|
|
pay_amount,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="confirmedSplitAmount != null">
|
|
|
|
|
confirmed_split_amount,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="refundAmount != null">
|
|
|
|
|
refund_amount,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="paymentRevokeAmount != null">
|
|
|
|
|
payment_revoke_amount,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="remainingSplitAmount != null">
|
|
|
|
|
remaining_split_amount,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderCode != null">
|
|
|
|
|
order_code,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="pileType != null">
|
|
|
|
|
pile_type,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dueRefundAmount != null">
|
|
|
|
|
due_refund_amount,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="settleAmount != null">
|
|
|
|
|
settle_amount,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="refundFlag != null">
|
|
|
|
|
refund_flag,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="splitFlag != null">
|
|
|
|
|
split_flag,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
update_time,
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
values
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
#{id,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="merchantCode != null">
|
|
|
|
|
#{merchantCode,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="payTime != null">
|
|
|
|
|
#{payTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="paymentId != null">
|
|
|
|
|
#{paymentId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderNo != null">
|
|
|
|
|
#{orderNo,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="payAmount != null">
|
|
|
|
|
#{payAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="confirmedSplitAmount != null">
|
|
|
|
|
#{confirmedSplitAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="refundAmount != null">
|
|
|
|
|
#{refundAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="paymentRevokeAmount != null">
|
|
|
|
|
#{paymentRevokeAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="remainingSplitAmount != null">
|
|
|
|
|
#{remainingSplitAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderCode != null">
|
|
|
|
|
#{orderCode,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="pileType != null">
|
|
|
|
|
#{pileType,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dueRefundAmount != null">
|
|
|
|
|
#{dueRefundAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="settleAmount != null">
|
|
|
|
|
#{settleAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="refundFlag != null">
|
|
|
|
|
#{refundFlag,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="splitFlag != null">
|
|
|
|
|
#{splitFlag,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
#{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
on duplicate key update
|
|
|
|
|
<trim suffixOverrides=",">
|
|
|
|
|
<if test="id != null">
|
|
|
|
|
id = #{id,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="merchantCode != null">
|
|
|
|
|
merchant_code = #{merchantCode,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="payTime != null">
|
|
|
|
|
pay_time = #{payTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="paymentId != null">
|
|
|
|
|
payment_id = #{paymentId,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderNo != null">
|
|
|
|
|
order_no = #{orderNo,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="payAmount != null">
|
|
|
|
|
pay_amount = #{payAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="confirmedSplitAmount != null">
|
|
|
|
|
confirmed_split_amount = #{confirmedSplitAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="refundAmount != null">
|
|
|
|
|
refund_amount = #{refundAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="paymentRevokeAmount != null">
|
|
|
|
|
payment_revoke_amount = #{paymentRevokeAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="remainingSplitAmount != null">
|
|
|
|
|
remaining_split_amount = #{remainingSplitAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="orderCode != null">
|
|
|
|
|
order_code = #{orderCode,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="pileType != null">
|
|
|
|
|
pile_type = #{pileType,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="dueRefundAmount != null">
|
|
|
|
|
due_refund_amount = #{dueRefundAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="settleAmount != null">
|
|
|
|
|
settle_amount = #{settleAmount,jdbcType=DECIMAL},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="refundFlag != null">
|
|
|
|
|
refund_flag = #{refundFlag,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="splitFlag != null">
|
|
|
|
|
split_flag = #{splitFlag,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="updateTime != null">
|
|
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
</mapper>
|