From f525648210da700d58d3b3a5c8a48d46abba4a68 Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Tue, 01 Oct 2024 21:20:02 +0800
Subject: [PATCH] 1
---
src/main/resources/mapper/UserWithdrawMapper.xml | 16 ++--------------
src/main/java/com/nq/pojo/UserBank.java | 6 +++---
src/main/java/com/nq/pojo/UserWithdraw.java | 21 +++++++++++++++++++--
src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java | 15 ++++++++++-----
src/main/java/com/nq/dao/UserWithdrawMapper.java | 2 --
5 files changed, 34 insertions(+), 26 deletions(-)
diff --git a/src/main/java/com/nq/dao/UserWithdrawMapper.java b/src/main/java/com/nq/dao/UserWithdrawMapper.java
index 83ba748..1823d61 100644
--- a/src/main/java/com/nq/dao/UserWithdrawMapper.java
+++ b/src/main/java/com/nq/dao/UserWithdrawMapper.java
@@ -9,8 +9,6 @@
public interface UserWithdrawMapper extends BaseMapper<UserWithdraw> {
int deleteByPrimaryKey(Integer paramInteger);
- int insertSelective(UserWithdraw paramUserWithdraw);
-
UserWithdraw selectByPrimaryKey(Integer paramInteger);
int updateByPrimaryKeySelective(UserWithdraw paramUserWithdraw);
diff --git a/src/main/java/com/nq/pojo/UserBank.java b/src/main/java/com/nq/pojo/UserBank.java
index 63a1d4c..ef75db2 100644
--- a/src/main/java/com/nq/pojo/UserBank.java
+++ b/src/main/java/com/nq/pojo/UserBank.java
@@ -17,16 +17,16 @@
private Integer userId;
- //银行
+ //银行名称
private String bankName;
- //分支
+ //开户支行
private String branch;
//分行号码
private String branchNo;
- //账号
+ //银行卡号
private String bankNo;
//姓名
diff --git a/src/main/java/com/nq/pojo/UserWithdraw.java b/src/main/java/com/nq/pojo/UserWithdraw.java
index 814ee53..785dba8 100644
--- a/src/main/java/com/nq/pojo/UserWithdraw.java
+++ b/src/main/java/com/nq/pojo/UserWithdraw.java
@@ -31,10 +31,27 @@
private Date transTime;
private String withName;
- @Excel(name = "银行卡号")
- private String bankNo;
+
+ //银行名称
@Excel(name = "银行名称")
private String bankName;
+
+ //开户支行
+ @Excel(name = "开户支行")
+ private String branch;
+
+ //分行号码
+ @Excel(name = "分行号码")
+ private String branchNo;
+
+ //银行卡号
+ @Excel(name = "银行卡号")
+ private String bankNo;
+
+ //姓名
+ @Excel(name = "姓名")
+ private String payeeName;
+
@Excel(name = "银行支行")
private String bankAddress;
diff --git a/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java b/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java
index a3beb29..51714c2 100644
--- a/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java
+++ b/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java
@@ -149,28 +149,33 @@
if(type == 0){
userWithdraw.setBankNo(userBank.getBankNo());
userWithdraw.setBankName(userBank.getBankName());
+ userWithdraw.setBranch("银行卡");
+ userWithdraw.setPayeeName(userBank.getPayeeName());
userWithdraw.setBankAddress("银行卡");
}else{
userWithdraw.setBankNo(walletAddress);
+ userWithdraw.setPayeeName("加密货币");
userWithdraw.setBankName("加密货币");
+ userWithdraw.setBranch("加密货币");
userWithdraw.setBankAddress("加密货币");
}
+
+ userWithdraw.setBranchNo(userBank.getBranchNo());
+
userWithdraw.setWithStatus(Integer.valueOf(0));
BigDecimal withfee = siteSetting.getWithFeePercent().multiply(new BigDecimal(amt)).add(new BigDecimal(siteSetting.getWithFeeSingle().intValue()));
userWithdraw.setWithFee(withfee);
userWithdraw.setAssetsType(accsetType);
+ log.info("userWithdraw------------:"+userWithdraw.toString());
+ log.info("userBank--------------:"+userBank.toString());
int insertCount = this.userWithdrawMapper.insert(userWithdraw);
if (insertCount > 0) {
return ServerResponse.createBySuccessMsg("提现成功",request);
}
-
- log.error("保存提现记录失败");
-
- throw new Exception("用户提现,保存提现记录失败");
} else {
return ServerResponse.createByErrorMsg("提现密码不正确!",request);
}
-
+ return ServerResponse.createBySuccessMsg("提现成功",request);
}
diff --git a/src/main/resources/mapper/UserWithdrawMapper.xml b/src/main/resources/mapper/UserWithdrawMapper.xml
index 6311b02..e8e5e9b 100644
--- a/src/main/resources/mapper/UserWithdrawMapper.xml
+++ b/src/main/resources/mapper/UserWithdrawMapper.xml
@@ -31,18 +31,6 @@
delete from user_withdraw
where id = #{id,jdbcType=INTEGER}
</delete>
- <insert id="insert" parameterType="com.nq.pojo.UserWithdraw" >
- insert into user_withdraw (id, user_id, nick_name,
- agent_id, with_amt, apply_time,
- trans_time, with_name, bank_no,
- bank_name, bank_address, with_status,
- with_fee, with_msg)
- values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{nickName,jdbcType=VARCHAR},
- #{agentId,jdbcType=INTEGER}, #{withAmt,jdbcType=DECIMAL}, #{applyTime,jdbcType=TIMESTAMP},
- #{transTime,jdbcType=TIMESTAMP}, #{withName,jdbcType=VARCHAR}, #{bankNo,jdbcType=VARCHAR},
- #{bankName,jdbcType=VARCHAR}, #{bankAddress,jdbcType=VARCHAR}, #{withStatus,jdbcType=INTEGER},
- #{withFee,jdbcType=DECIMAL}, #{withMsg,jdbcType=VARCHAR})
- </insert>
<insert id="insertSelective" parameterType="com.nq.pojo.UserWithdraw" >
insert into user_withdraw
<trim prefix="(" suffix=")" suffixOverrides="," >
@@ -231,9 +219,9 @@
ORDER BY id DESC
</select>
- <select id="listByAdmin" resultMap="BaseResultMap" parameterType="map">
+ <select id="listByAdmin" resultType="com.nq.pojo.UserWithdraw" parameterType="map">
SELECT
- <include refid="Base_Column_List"/>
+ *
FROM user_withdraw
where agent_id != 1
<if test="agentId != null">
--
Gitblit v1.9.3