mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
新增order_no字段
This commit is contained in:
@@ -615,12 +615,12 @@ public class AdapayService {
|
||||
|
||||
// 发送提现申请
|
||||
Map<String, Object> settleCountParams = Maps.newHashMap();
|
||||
settleCountParams.put("order_no", "drawcash_" + System.currentTimeMillis());
|
||||
String orderNo = "drawcash_" + dto.getMerchantId() + "_" +System.currentTimeMillis();
|
||||
settleCountParams.put("order_no", orderNo);
|
||||
settleCountParams.put("cash_amt", AdapayUtil.formatAmount(cashAmt));
|
||||
settleCountParams.put("member_id", adapayAccountBalanceVO.getAdapayMemberId());
|
||||
settleCountParams.put("app_id", config.getAdapayAppId());
|
||||
settleCountParams.put("settle_account_id", adapayAccountBalanceVO.getSettleAccountId());
|
||||
settleCountParams.put("cash_type", "T1");
|
||||
settleCountParams.put("notify_url", ADAPAY_CALLBACK_URL);
|
||||
Map<String, Object> settleCount = Drawcash.create(settleCountParams, config.getWechatAppId());
|
||||
log.info("申请取现接口,请求参数:{}, 返回参数:{}", JSON.toJSONString(settleCountParams), JSON.toJSONString(settleCount));
|
||||
@@ -638,6 +638,7 @@ public class AdapayService {
|
||||
ClearingWithdrawInfo record = new ClearingWithdrawInfo();
|
||||
record.setMerchantId(dto.getMerchantId());
|
||||
record.setWithdrawCode(id);
|
||||
record.setOrderNo(orderNo);
|
||||
record.setWithdrawStatus(Constants.ZERO);
|
||||
Date now = new Date();
|
||||
record.setApplicationTime(now);
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package com.jsowell.pile.domain;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.util.Date;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 提现记录表
|
||||
@@ -26,6 +23,11 @@ public class ClearingWithdrawInfo {
|
||||
*/
|
||||
private String merchantId;
|
||||
|
||||
/**
|
||||
* 交易单号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 提现编号
|
||||
*/
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<!--@Table clearing_withdraw_info-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="merchant_id" jdbcType="VARCHAR" property="merchantId" />
|
||||
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
|
||||
<result column="withdraw_code" jdbcType="VARCHAR" property="withdrawCode" />
|
||||
<result column="withdraw_status" jdbcType="VARCHAR" property="withdrawStatus" />
|
||||
<result column="application_time" jdbcType="TIMESTAMP" property="applicationTime" />
|
||||
@@ -18,7 +19,7 @@
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, merchant_id, withdraw_code, withdraw_status, application_time, arrival_time,
|
||||
id, merchant_id, order_no, 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">
|
||||
@@ -35,14 +36,14 @@
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.ClearingWithdrawInfo" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
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 (#{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 into clearing_withdraw_info (merchant_id, order_no, withdraw_code,
|
||||
withdraw_status, application_time, arrival_time,
|
||||
create_by, create_time, update_by,
|
||||
update_time, del_flag)
|
||||
values (#{merchantId,jdbcType=VARCHAR}, #{orderNo,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" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.ClearingWithdrawInfo" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
@@ -51,6 +52,9 @@
|
||||
<if test="merchantId != null">
|
||||
merchant_id,
|
||||
</if>
|
||||
<if test="orderNo != null">
|
||||
order_no,
|
||||
</if>
|
||||
<if test="withdrawCode != null">
|
||||
withdraw_code,
|
||||
</if>
|
||||
@@ -83,6 +87,9 @@
|
||||
<if test="merchantId != null">
|
||||
#{merchantId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderNo != null">
|
||||
#{orderNo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="withdrawCode != null">
|
||||
#{withdrawCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -119,6 +126,9 @@
|
||||
<if test="merchantId != null">
|
||||
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderNo != null">
|
||||
order_no = #{orderNo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="withdrawCode != null">
|
||||
withdraw_code = #{withdrawCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -153,6 +163,7 @@
|
||||
<!--@mbg.generated-->
|
||||
update clearing_withdraw_info
|
||||
set merchant_id = #{merchantId,jdbcType=VARCHAR},
|
||||
order_no = #{orderNo,jdbcType=VARCHAR},
|
||||
withdraw_code = #{withdrawCode,jdbcType=VARCHAR},
|
||||
withdraw_status = #{withdrawStatus,jdbcType=VARCHAR},
|
||||
application_time = #{applicationTime,jdbcType=TIMESTAMP},
|
||||
@@ -173,6 +184,11 @@
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.merchantId,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="withdraw_code = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when id = #{item.id,jdbcType=INTEGER} then #{item.withdrawCode,jdbcType=VARCHAR}
|
||||
@@ -227,14 +243,15 @@
|
||||
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
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)
|
||||
(merchant_id, order_no, 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.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})
|
||||
(#{item.merchantId,jdbcType=VARCHAR}, #{item.orderNo,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" keyColumn="id" keyProperty="id" parameterType="com.jsowell.pile.domain.ClearingWithdrawInfo" useGeneratedKeys="true">
|
||||
@@ -245,6 +262,7 @@
|
||||
id,
|
||||
</if>
|
||||
merchant_id,
|
||||
order_no,
|
||||
withdraw_code,
|
||||
withdraw_status,
|
||||
application_time,
|
||||
@@ -261,6 +279,7 @@
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
#{merchantId,jdbcType=VARCHAR},
|
||||
#{orderNo,jdbcType=VARCHAR},
|
||||
#{withdrawCode,jdbcType=VARCHAR},
|
||||
#{withdrawStatus,jdbcType=VARCHAR},
|
||||
#{applicationTime,jdbcType=TIMESTAMP},
|
||||
@@ -277,6 +296,7 @@
|
||||
id = #{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
||||
order_no = #{orderNo,jdbcType=VARCHAR},
|
||||
withdraw_code = #{withdrawCode,jdbcType=VARCHAR},
|
||||
withdraw_status = #{withdrawStatus,jdbcType=VARCHAR},
|
||||
application_time = #{applicationTime,jdbcType=TIMESTAMP},
|
||||
@@ -298,6 +318,9 @@
|
||||
<if test="merchantId != null">
|
||||
merchant_id,
|
||||
</if>
|
||||
<if test="orderNo != null">
|
||||
order_no,
|
||||
</if>
|
||||
<if test="withdrawCode != null">
|
||||
withdraw_code,
|
||||
</if>
|
||||
@@ -334,6 +357,9 @@
|
||||
<if test="merchantId != null">
|
||||
#{merchantId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderNo != null">
|
||||
#{orderNo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="withdrawCode != null">
|
||||
#{withdrawCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -370,6 +396,9 @@
|
||||
<if test="merchantId != null">
|
||||
merchant_id = #{merchantId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="orderNo != null">
|
||||
order_no = #{orderNo,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="withdrawCode != null">
|
||||
withdraw_code = #{withdrawCode,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user