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

@@ -1083,6 +1083,7 @@ public class OrderService {
// 通过取现id查询取现数据 // 通过取现id查询取现数据
ClearingWithdrawInfo clearingWithdrawInfo = clearingWithdrawInfoService.selectByWithdrawCode(withdrawCode); ClearingWithdrawInfo clearingWithdrawInfo = clearingWithdrawInfoService.selectByWithdrawCode(withdrawCode);
clearingWithdrawInfo.setWithdrawStatus(Constants.ONE); clearingWithdrawInfo.setWithdrawStatus(Constants.ONE);
clearingWithdrawInfo.setUpdateTime(DateUtils.getNowDate());
clearingWithdrawInfoService.insertOrUpdate(clearingWithdrawInfo); clearingWithdrawInfoService.insertOrUpdate(clearingWithdrawInfo);
} }
@@ -1096,6 +1097,7 @@ public class OrderService {
// 通过取现id查询取现数据 // 通过取现id查询取现数据
ClearingWithdrawInfo clearingWithdrawInfo = clearingWithdrawInfoService.selectByWithdrawCode(withdrawCode); ClearingWithdrawInfo clearingWithdrawInfo = clearingWithdrawInfoService.selectByWithdrawCode(withdrawCode);
clearingWithdrawInfo.setWithdrawStatus(Constants.TWO); clearingWithdrawInfo.setWithdrawStatus(Constants.TWO);
clearingWithdrawInfo.setUpdateTime(DateUtils.getNowDate());
clearingWithdrawInfoService.insertOrUpdate(clearingWithdrawInfo); clearingWithdrawInfoService.insertOrUpdate(clearingWithdrawInfo);
} }

View File

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

View File

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

View File

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