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