清分账单详情表加汇付会员id字段

This commit is contained in:
Guoqs
2025-02-20 15:32:55 +08:00
parent 04bd04186c
commit 6398ddf54d
3 changed files with 163 additions and 79 deletions

View File

@@ -1,15 +1,20 @@
package com.jsowell.pile.domain;
import lombok.*;
import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
/**
* 清分账单详情表
*/
@Getter
@Setter
@Data
@Accessors(chain = true)
@SuperBuilder
@Builder
@AllArgsConstructor
@NoArgsConstructor
@@ -29,6 +34,11 @@ public class ClearingBillDetail {
*/
private String orderCode;
/**
* 汇付会员id
*/
private String adapayMemberId;
/**
* 支付id
*/

View File

@@ -1,19 +1,30 @@
package com.jsowell.pile.mapper;
import com.jsowell.pile.domain.ClearingBillDetail;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface ClearingBillDetailMapper {
/**
* delete by primary key
*
* @param id primaryKey
* @return deleteCount
*/
int deleteByPrimaryKey(Integer id);
int insertSelective(ClearingBillDetail record);
ClearingBillDetail selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(ClearingBillDetail record);
int updateBatch(List<ClearingBillDetail> list);
int updateBatchSelective(List<ClearingBillDetail> list);
int batchInsert(@Param("list") List<ClearingBillDetail> list);
int insertOrUpdate(ClearingBillDetail record);
int insertOrUpdateSelective(ClearingBillDetail record);
/**
* insert record to table
*
@@ -22,34 +33,6 @@ public interface ClearingBillDetailMapper {
*/
int insert(ClearingBillDetail record);
int insertOrUpdate(ClearingBillDetail record);
int insertOrUpdateSelective(ClearingBillDetail record);
/**
* insert record to table selective
*
* @param record the record
* @return insert count
*/
int insertSelective(ClearingBillDetail record);
/**
* select by primary key
*
* @param id primary key
* @return object by primary key
*/
ClearingBillDetail selectByPrimaryKey(Integer id);
/**
* update record selective
*
* @param record the updated record
* @return update count
*/
int updateByPrimaryKeySelective(ClearingBillDetail record);
/**
* update record
*
@@ -58,10 +41,6 @@ public interface ClearingBillDetailMapper {
*/
int updateByPrimaryKey(ClearingBillDetail record);
int updateBatch(List<ClearingBillDetail> list);
int batchInsert(@Param("list") List<ClearingBillDetail> list);
List<ClearingBillDetail> selectByOrderCodes(@Param("orderCodes") List<String> orderCodes);
// 根据清分编号删除

View File

@@ -7,6 +7,7 @@
<id column="id" jdbcType="INTEGER" property="id" />
<result column="clearing_bill_code" jdbcType="VARCHAR" property="clearingBillCode" />
<result column="order_code" jdbcType="VARCHAR" property="orderCode" />
<result column="adapay_member_id" jdbcType="VARCHAR" property="adapayMemberId" />
<result column="payment_id" jdbcType="VARCHAR" property="paymentId" />
<result column="confirm_id" jdbcType="VARCHAR" property="confirmId" />
<result column="confirm_amt" jdbcType="DECIMAL" property="confirmAmt" />
@@ -19,8 +20,8 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, clearing_bill_code, order_code, payment_id, confirm_id, confirm_amt, fee_amt,
create_by, create_time, update_by, update_time, del_flag
id, clearing_bill_code, order_code, adapay_member_id, payment_id, confirm_id, confirm_amt,
fee_amt, create_by, create_time, update_by, update_time, del_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--@mbg.generated-->
@@ -34,17 +35,6 @@
delete from clearing_bill_detail
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.ClearingBillDetail" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into clearing_bill_detail (clearing_bill_code, order_code, payment_id,
confirm_id, confirm_amt, fee_amt,
create_by, create_time, update_by,
update_time, del_flag)
values (#{clearingBillCode,jdbcType=VARCHAR}, #{orderCode,jdbcType=VARCHAR}, #{paymentId,jdbcType=VARCHAR},
#{confirmId,jdbcType=VARCHAR}, #{confirmAmt,jdbcType=DECIMAL}, #{feeAmt,jdbcType=DECIMAL},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.ClearingBillDetail" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into clearing_bill_detail
@@ -55,6 +45,9 @@
<if test="orderCode != null">
order_code,
</if>
<if test="adapayMemberId != null">
adapay_member_id,
</if>
<if test="paymentId != null">
payment_id,
</if>
@@ -90,6 +83,9 @@
<if test="orderCode != null">
#{orderCode,jdbcType=VARCHAR},
</if>
<if test="adapayMemberId != null">
#{adapayMemberId,jdbcType=VARCHAR},
</if>
<if test="paymentId != null">
#{paymentId,jdbcType=VARCHAR},
</if>
@@ -129,6 +125,9 @@
<if test="orderCode != null">
order_code = #{orderCode,jdbcType=VARCHAR},
</if>
<if test="adapayMemberId != null">
adapay_member_id = #{adapayMemberId,jdbcType=VARCHAR},
</if>
<if test="paymentId != null">
payment_id = #{paymentId,jdbcType=VARCHAR},
</if>
@@ -159,22 +158,6 @@
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.jsowell.pile.domain.ClearingBillDetail">
<!--@mbg.generated-->
update clearing_bill_detail
set clearing_bill_code = #{clearingBillCode,jdbcType=VARCHAR},
order_code = #{orderCode,jdbcType=VARCHAR},
payment_id = #{paymentId,jdbcType=VARCHAR},
confirm_id = #{confirmId,jdbcType=VARCHAR},
confirm_amt = #{confirmAmt,jdbcType=DECIMAL},
fee_amt = #{feeAmt,jdbcType=DECIMAL},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
del_flag = #{delFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated-->
update clearing_bill_detail
@@ -189,6 +172,11 @@
when id = #{item.id,jdbcType=INTEGER} then #{item.orderCode,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="adapay_member_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.adapayMemberId,jdbcType=VARCHAR}
</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}
@@ -240,17 +228,112 @@
#{item.id,jdbcType=INTEGER}
</foreach>
</update>
<update id="updateBatchSelective" parameterType="java.util.List">
<!--@mbg.generated-->
update clearing_bill_detail
<trim prefix="set" suffixOverrides=",">
<trim prefix="clearing_bill_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.clearingBillCode != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.clearingBillCode,jdbcType=VARCHAR}
</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="adapay_member_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.adapayMemberId != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.adapayMemberId,jdbcType=VARCHAR}
</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="confirm_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.confirmId != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.confirmId,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="confirm_amt = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.confirmAmt != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.confirmAmt,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="fee_amt = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.feeAmt != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.feeAmt,jdbcType=DECIMAL}
</if>
</foreach>
</trim>
<trim prefix="create_by = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.createBy != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.createBy,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="create_time = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.createTime != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.createTime,jdbcType=TIMESTAMP}
</if>
</foreach>
</trim>
<trim prefix="update_by = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.updateBy != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.updateBy,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 prefix="del_flag = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.delFlag != null">
when id = #{item.id,jdbcType=INTEGER} then #{item.delFlag,jdbcType=VARCHAR}
</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 clearing_bill_detail
(clearing_bill_code, order_code, payment_id, confirm_id, confirm_amt, fee_amt, create_by,
create_time, update_by, update_time, del_flag)
(clearing_bill_code, order_code, adapay_member_id, payment_id, confirm_id, confirm_amt,
fee_amt, create_by, create_time, update_by, update_time, del_flag)
values
<foreach collection="list" item="item" separator=",">
(#{item.clearingBillCode,jdbcType=VARCHAR}, #{item.orderCode,jdbcType=VARCHAR}, #{item.paymentId,jdbcType=VARCHAR},
#{item.confirmId,jdbcType=VARCHAR}, #{item.confirmAmt,jdbcType=DECIMAL}, #{item.feeAmt,jdbcType=DECIMAL},
#{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR},
#{item.updateTime,jdbcType=TIMESTAMP}, #{item.delFlag,jdbcType=VARCHAR})
(#{item.clearingBillCode,jdbcType=VARCHAR}, #{item.orderCode,jdbcType=VARCHAR}, #{item.adapayMemberId,jdbcType=VARCHAR},
#{item.paymentId,jdbcType=VARCHAR}, #{item.confirmId,jdbcType=VARCHAR}, #{item.confirmAmt,jdbcType=DECIMAL},
#{item.feeAmt,jdbcType=DECIMAL}, #{item.createBy,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
#{item.updateBy,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, #{item.delFlag,jdbcType=VARCHAR}
)
</foreach>
</insert>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.ClearingBillDetail" useGeneratedKeys="true">
@@ -262,6 +345,7 @@
</if>
clearing_bill_code,
order_code,
adapay_member_id,
payment_id,
confirm_id,
confirm_amt,
@@ -279,6 +363,7 @@
</if>
#{clearingBillCode,jdbcType=VARCHAR},
#{orderCode,jdbcType=VARCHAR},
#{adapayMemberId,jdbcType=VARCHAR},
#{paymentId,jdbcType=VARCHAR},
#{confirmId,jdbcType=VARCHAR},
#{confirmAmt,jdbcType=DECIMAL},
@@ -296,6 +381,7 @@
</if>
clearing_bill_code = #{clearingBillCode,jdbcType=VARCHAR},
order_code = #{orderCode,jdbcType=VARCHAR},
adapay_member_id = #{adapayMemberId,jdbcType=VARCHAR},
payment_id = #{paymentId,jdbcType=VARCHAR},
confirm_id = #{confirmId,jdbcType=VARCHAR},
confirm_amt = #{confirmAmt,jdbcType=DECIMAL},
@@ -320,6 +406,9 @@
<if test="orderCode != null">
order_code,
</if>
<if test="adapayMemberId != null">
adapay_member_id,
</if>
<if test="paymentId != null">
payment_id,
</if>
@@ -359,6 +448,9 @@
<if test="orderCode != null">
#{orderCode,jdbcType=VARCHAR},
</if>
<if test="adapayMemberId != null">
#{adapayMemberId,jdbcType=VARCHAR},
</if>
<if test="paymentId != null">
#{paymentId,jdbcType=VARCHAR},
</if>
@@ -398,6 +490,9 @@
<if test="orderCode != null">
order_code = #{orderCode,jdbcType=VARCHAR},
</if>
<if test="adapayMemberId != null">
adapay_member_id = #{adapayMemberId,jdbcType=VARCHAR},
</if>
<if test="paymentId != null">
payment_id = #{paymentId,jdbcType=VARCHAR},
</if>
@@ -434,7 +529,7 @@
from clearing_bill_detail
where del_flag = '0'
and order_code in
<foreach collection="orderCodes" item="orderCode" open="(" separator="," close=")">
<foreach close=")" collection="orderCodes" item="orderCode" open="(" separator=",">
#{orderCode,jdbcType=VARCHAR}
</foreach>
</select>