update 提现记录表

This commit is contained in:
2023-08-08 14:35:18 +08:00
parent 7ca9ecd514
commit c0edb0aee9
4 changed files with 121 additions and 57 deletions

View File

@@ -8,8 +8,8 @@ import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* 提现记录表
*/
* 提现记录表
*/
@Getter
@Setter
@Builder
@@ -17,52 +17,57 @@ import lombok.Setter;
@NoArgsConstructor
public class ClearingWithdrawInfo {
/**
* 主键
*/
* 主键
*/
private Integer id;
/**
* 提现编号
*/
* 商户id
*/
private String merchantId;
/**
* 提现编号
*/
private String withdrawCode;
/**
* 提现状态(0-处理中1-已提现)
*/
* 提现状态(0-处理中1-已提现)
*/
private String withdrawStatus;
/**
* 申请时间
*/
* 申请时间
*/
private Date applicationTime;
/**
* 到账时间
*/
* 到账时间
*/
private Date arrivalTime;
/**
* 创建人
*/
* 创建人
*/
private String createBy;
/**
* 创建时间
*/
* 创建时间
*/
private Date createTime;
/**
* 更新人
*/
* 更新人
*/
private String updateBy;
/**
* 更新时间
*/
* 更新时间
*/
private Date updateTime;
/**
* 删除标识0-正常1-删除)
*/
* 删除标识0-正常1-删除)
*/
private String delFlag;
}

View File

@@ -8,6 +8,7 @@ import java.util.List;
public interface ClearingWithdrawInfoMapper {
/**
* delete by primary key
*
* @param id primaryKey
* @return deleteCount
*/
@@ -15,6 +16,7 @@ public interface ClearingWithdrawInfoMapper {
/**
* insert record to table
*
* @param record the record
* @return insert count
*/
@@ -26,6 +28,7 @@ public interface ClearingWithdrawInfoMapper {
/**
* insert record to table selective
*
* @param record the record
* @return insert count
*/
@@ -33,6 +36,7 @@ public interface ClearingWithdrawInfoMapper {
/**
* select by primary key
*
* @param id primary key
* @return object by primary key
*/
@@ -40,6 +44,7 @@ public interface ClearingWithdrawInfoMapper {
/**
* update record selective
*
* @param record the updated record
* @return update count
*/
@@ -47,6 +52,7 @@ public interface ClearingWithdrawInfoMapper {
/**
* update record
*
* @param record the updated record
* @return update count
*/

View File

@@ -5,6 +5,7 @@
<!--@mbg.generated-->
<!--@Table clearing_withdraw_info-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
<result column="withdraw_code" jdbcType="VARCHAR" property="withdrawCode" />
<result column="withdraw_status" jdbcType="VARCHAR" property="withdrawStatus" />
<result column="application_time" jdbcType="TIMESTAMP" property="applicationTime" />
@@ -17,8 +18,8 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, withdraw_code, withdraw_status, application_time, arrival_time, create_by, create_time,
update_by, update_time, del_flag
id, merchant_id, withdraw_code, withdraw_status, application_time, arrival_time,
create_by, create_time, update_by, update_time, del_flag
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
<!--@mbg.generated-->
@@ -32,23 +33,23 @@
delete from clearing_withdraw_info
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.jsowell.pile.domain.ClearingWithdrawInfo">
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.ClearingWithdrawInfo" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into clearing_withdraw_info (id, withdraw_code, withdraw_status,
insert into clearing_withdraw_info (merchant_id, withdraw_code, withdraw_status,
application_time, arrival_time, create_by,
create_time, update_by, update_time,
del_flag)
values (#{id,jdbcType=INTEGER}, #{withdrawCode,jdbcType=VARCHAR}, #{withdrawStatus,jdbcType=VARCHAR},
values (#{merchantId,jdbcType=VARCHAR}, #{withdrawCode,jdbcType=VARCHAR}, #{withdrawStatus,jdbcType=VARCHAR},
#{applicationTime,jdbcType=TIMESTAMP}, #{arrivalTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{delFlag,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsowell.pile.domain.ClearingWithdrawInfo">
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.ClearingWithdrawInfo" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into clearing_withdraw_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
<if test="merchantId != null">
merchant_id,
</if>
<if test="withdrawCode != null">
withdraw_code,
@@ -79,8 +80,8 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
<if test="merchantId != null">
#{merchantId,jdbcType=VARCHAR},
</if>
<if test="withdrawCode != null">
#{withdrawCode,jdbcType=VARCHAR},
@@ -115,6 +116,9 @@
<!--@mbg.generated-->
update clearing_withdraw_info
<set>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=VARCHAR},
</if>
<if test="withdrawCode != null">
withdraw_code = #{withdrawCode,jdbcType=VARCHAR},
</if>
@@ -148,7 +152,8 @@
<update id="updateByPrimaryKey" parameterType="com.jsowell.pile.domain.ClearingWithdrawInfo">
<!--@mbg.generated-->
update clearing_withdraw_info
set withdraw_code = #{withdrawCode,jdbcType=VARCHAR},
set merchant_id = #{merchantId,jdbcType=VARCHAR},
withdraw_code = #{withdrawCode,jdbcType=VARCHAR},
withdraw_status = #{withdrawStatus,jdbcType=VARCHAR},
application_time = #{applicationTime,jdbcType=TIMESTAMP},
arrival_time = #{arrivalTime,jdbcType=TIMESTAMP},
@@ -163,6 +168,11 @@
<!--@mbg.generated-->
update clearing_withdraw_info
<trim prefix="set" suffixOverrides=",">
<trim prefix="merchant_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.merchantId,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="withdraw_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=INTEGER} then #{item.withdrawCode,jdbcType=VARCHAR}
@@ -214,45 +224,80 @@
#{item.id,jdbcType=INTEGER}
</foreach>
</update>
<insert id="batchInsert" parameterType="map">
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into clearing_withdraw_info
(id, withdraw_code, withdraw_status, application_time, arrival_time, create_by, create_time,
update_by, update_time, del_flag)
(merchant_id, withdraw_code, withdraw_status, application_time, arrival_time, create_by,
create_time, update_by, update_time, del_flag)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.withdrawCode,jdbcType=VARCHAR}, #{item.withdrawStatus,jdbcType=VARCHAR},
(#{item.merchantId,jdbcType=VARCHAR}, #{item.withdrawCode,jdbcType=VARCHAR}, #{item.withdrawStatus,jdbcType=VARCHAR},
#{item.applicationTime,jdbcType=TIMESTAMP}, #{item.arrivalTime,jdbcType=TIMESTAMP},
#{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" parameterType="com.jsowell.pile.domain.ClearingWithdrawInfo">
<!--@mbg.generated-->
insert into clearing_withdraw_info
(id, withdraw_code, withdraw_status, application_time, arrival_time, create_by,
update_by, del_flag)
values
(#{id,jdbcType=INTEGER}, #{withdrawCode,jdbcType=VARCHAR}, #{withdrawStatus,jdbcType=VARCHAR},
#{applicationTime,jdbcType=TIMESTAMP}, #{arrivalTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR},
#{updateBy,jdbcType=VARCHAR}, #{delFlag,jdbcType=VARCHAR})
on duplicate key update
id = #{id,jdbcType=INTEGER},
withdraw_code = #{withdrawCode,jdbcType=VARCHAR},
withdraw_status = #{withdrawStatus,jdbcType=VARCHAR},
application_time = #{applicationTime,jdbcType=TIMESTAMP},
arrival_time = #{arrivalTime,jdbcType=TIMESTAMP},
create_by = #{createBy,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR},
del_flag = #{delFlag,jdbcType=VARCHAR}
</insert>
<insert id="insertOrUpdateSelective" parameterType="com.jsowell.pile.domain.ClearingWithdrawInfo">
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.ClearingWithdrawInfo" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into clearing_withdraw_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
merchant_id,
withdraw_code,
withdraw_status,
application_time,
arrival_time,
create_by,
create_time,
update_by,
update_time,
del_flag,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
#{merchantId,jdbcType=VARCHAR},
#{withdrawCode,jdbcType=VARCHAR},
#{withdrawStatus,jdbcType=VARCHAR},
#{applicationTime,jdbcType=TIMESTAMP},
#{arrivalTime,jdbcType=TIMESTAMP},
#{createBy,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP},
#{updateBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP},
#{delFlag,jdbcType=VARCHAR},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
merchant_id = #{merchantId,jdbcType=VARCHAR},
withdraw_code = #{withdrawCode,jdbcType=VARCHAR},
withdraw_status = #{withdrawStatus,jdbcType=VARCHAR},
application_time = #{applicationTime,jdbcType=TIMESTAMP},
arrival_time = #{arrivalTime,jdbcType=TIMESTAMP},
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},
</trim>
</insert>
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.ClearingWithdrawInfo" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into clearing_withdraw_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="merchantId != null">
merchant_id,
</if>
<if test="withdrawCode != null">
withdraw_code,
</if>
@@ -286,6 +331,9 @@
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="merchantId != null">
#{merchantId,jdbcType=VARCHAR},
</if>
<if test="withdrawCode != null">
#{withdrawCode,jdbcType=VARCHAR},
</if>
@@ -319,6 +367,9 @@
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
<if test="merchantId != null">
merchant_id = #{merchantId,jdbcType=VARCHAR},
</if>
<if test="withdrawCode != null">
withdraw_code = #{withdrawCode,jdbcType=VARCHAR},
</if>