From 95a52a6087a7587c89253c099f3d76213f8318ab Mon Sep 17 00:00:00 2001
From: dd <gitluke@outlook.com>
Date: Wed, 28 Jan 2026 23:03:52 +0800
Subject: [PATCH] 1
---
src/main/resources/mapper/UserWithdrawMapper.xml | 26 ++++++------
src/main/java/com/nq/vo/pay/OutMoneyVo.java | 20 ++++++++++
src/main/java/com/nq/controller/protol/UserWithdrawController.java | 18 ++++++++-
src/main/java/com/nq/pojo/UserWithdraw.java | 11 ++++-
src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java | 12 +++--
src/main/java/com/nq/service/IUserWithdrawService.java | 3 +
6 files changed, 66 insertions(+), 24 deletions(-)
diff --git a/src/main/java/com/nq/controller/protol/UserWithdrawController.java b/src/main/java/com/nq/controller/protol/UserWithdrawController.java
index 5b8c926..43e696e 100644
--- a/src/main/java/com/nq/controller/protol/UserWithdrawController.java
+++ b/src/main/java/com/nq/controller/protol/UserWithdrawController.java
@@ -7,6 +7,7 @@
import javax.servlet.http.HttpServletRequest;
+import com.nq.vo.pay.OutMoneyVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -42,9 +43,22 @@
//用户提现
@RequestMapping({"outMoney.do"})
@ResponseBody
- public ServerResponse outMoney(@RequestParam(value = "amt") String amt,@RequestParam(value = "bankId") String bankId,
+ public ServerResponse outMoney(@RequestParam(value = "amt") String amt,
@RequestParam(value = "assetsType") String accsetType,
+ @RequestParam(value = "bankId") String bankId,
+ @RequestParam(value = "bankName", required = false) String bankName,
+ @RequestParam(value = "bankAddress", required = false) String bankAddress,
+ @RequestParam(value = "branchCode", required = false) String branchCode,
+ @RequestParam(value = "cardholderName", required = false) String cardholderName,
HttpServletRequest request) {
+
+
+ OutMoneyVo outMoneyVo = new OutMoneyVo();
+ outMoneyVo.setBankNo(bankId);
+ outMoneyVo.setBankName(bankName);
+ outMoneyVo.setBankAddress(bankAddress);
+ outMoneyVo.setBranchCode(branchCode);
+ outMoneyVo.setCardholderName(cardholderName);
ServerResponse serverResponse = null;
User user = this.iUserService.getCurrentRefreshUser(request);
@@ -65,7 +79,7 @@
// return ServerResponse.createByErrorMsg("请输入整数!",request);
// }
synchronized (user.getId()){
- serverResponse = this.iUserWithdrawService.outMoney(amt, user.getWithPwd(), accsetType,bankId,request);
+ serverResponse = this.iUserWithdrawService.outMoney(outMoneyVo,amt, user.getWithPwd(), accsetType,request);
}
} catch (Exception e) {
log.error("出金异常 e = {}", e);
diff --git a/src/main/java/com/nq/pojo/UserWithdraw.java b/src/main/java/com/nq/pojo/UserWithdraw.java
index d4b033a..3d4a339 100644
--- a/src/main/java/com/nq/pojo/UserWithdraw.java
+++ b/src/main/java/com/nq/pojo/UserWithdraw.java
@@ -31,12 +31,17 @@
private Date transTime;
private String withName;
- @Excel(name = "银行卡号")
- private String bankNo;
+
@Excel(name = "银行名称")
private String bankName;
- @Excel(name = "银行支行")
+ @Excel(name = "分行名称")
private String bankAddress;
+ @Excel(name = "分行代码")
+ private String branchCode;
+ @Excel(name = "银行卡号")
+ private String bankNo;
+ @Excel(name = "持卡人姓名")
+ private String cardholderName;
@Excel(name = "状态" ,replace = { "审核中_0", "成功_1", "失败_2", "取消_3","已提交_4" })
private Integer withStatus;
diff --git a/src/main/java/com/nq/service/IUserWithdrawService.java b/src/main/java/com/nq/service/IUserWithdrawService.java
index e6ea808..359a205 100644
--- a/src/main/java/com/nq/service/IUserWithdrawService.java
+++ b/src/main/java/com/nq/service/IUserWithdrawService.java
@@ -6,6 +6,7 @@
import com.nq.pojo.PaymentCallbackTwo;
import com.nq.pojo.TradeResultVO;
import com.nq.pojo.UserWithdraw;
+import com.nq.vo.pay.OutMoneyVo;
import java.io.IOException;
import java.math.BigDecimal;
@@ -14,7 +15,7 @@
import javax.servlet.http.HttpServletResponse;
public interface IUserWithdrawService {
- ServerResponse outMoney(String paramString,String with_Pwd, String assetsType,String bankId,HttpServletRequest paramHttpServletRequest) throws Exception;
+ ServerResponse outMoney(OutMoneyVo outMoneyVo,String paramString, String with_Pwd, String assetsType, HttpServletRequest paramHttpServletRequest) throws Exception;
ServerResponse<PageInfo> findUserWithList(String paramString, HttpServletRequest paramHttpServletRequest, int paramInt1, int paramInt2);
diff --git a/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java b/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java
index aae1bfa..e08eeed 100644
--- a/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java
+++ b/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java
@@ -25,6 +25,7 @@
import javax.servlet.http.HttpServletResponse;
import com.nq.utils.timeutil.TimeUtil;
+import com.nq.vo.pay.OutMoneyVo;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
@@ -79,7 +80,7 @@
StockTimeSettingMapper stockTimeSettingMapper;
@Transactional(rollbackFor = Exception.class)
- public ServerResponse outMoney(String amt, String with_Pwd,String accsetType,String bankId,HttpServletRequest request) throws Exception {
+ public ServerResponse outMoney(OutMoneyVo outMoneyVo,String amt, String with_Pwd, String accsetType, HttpServletRequest request) throws Exception {
if (StringUtils.isBlank(amt)) {
return ServerResponse.createByErrorMsg("The parameter cannot be null");
}
@@ -128,10 +129,11 @@
userWithdraw.setWithAmt(new BigDecimal(amt));
userWithdraw.setApplyTime(new Date());
userWithdraw.setWithName(user.getRealName());
- userWithdraw.setBankNo(bankId);
-// userWithdraw.setBankNo(userBank.getBankNo());
-// userWithdraw.setBankName(userBank.getBankName());
-// userWithdraw.setBankAddress(userBank.getBankAddress());
+ userWithdraw.setBankNo(outMoneyVo.getBankNo());
+ userWithdraw.setBankName(outMoneyVo.getBankName());
+ userWithdraw.setBankAddress(outMoneyVo.getBankAddress());
+ userWithdraw.setBranchCode(outMoneyVo.getBranchCode());
+ userWithdraw.setCardholderName(outMoneyVo.getCardholderName());
userWithdraw.setWithStatus(Integer.valueOf(0));
BigDecimal withfee = siteSetting.getWithFeePercent().multiply(new BigDecimal(amt)).add(new BigDecimal(siteSetting.getWithFeeSingle().intValue()));
userWithdraw.setWithFee(withfee);
diff --git a/src/main/java/com/nq/vo/pay/OutMoneyVo.java b/src/main/java/com/nq/vo/pay/OutMoneyVo.java
new file mode 100644
index 0000000..9eba08f
--- /dev/null
+++ b/src/main/java/com/nq/vo/pay/OutMoneyVo.java
@@ -0,0 +1,20 @@
+package com.nq.vo.pay;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+@Data
+public class OutMoneyVo {
+
+ //银行名称
+ private String bankName;
+ //分行名称
+ private String bankAddress;
+ //分行代码
+ private String branchCode;
+ //银行卡号
+ private String bankNo;
+ //持卡人姓名
+ private String cardholderName;
+
+}
diff --git a/src/main/resources/mapper/UserWithdrawMapper.xml b/src/main/resources/mapper/UserWithdrawMapper.xml
index 2313218..53b7e1b 100644
--- a/src/main/resources/mapper/UserWithdrawMapper.xml
+++ b/src/main/resources/mapper/UserWithdrawMapper.xml
@@ -32,18 +32,18 @@
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, accset_type)
- 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}, #{accsetType,jdbcType=VARCHAR})
- </insert>
+<!-- <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, accset_type)-->
+<!-- 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}, #{accsetType,jdbcType=VARCHAR})-->
+<!-- </insert>-->
<insert id="insertSelective" parameterType="com.nq.pojo.UserWithdraw" >
insert into user_withdraw
<trim prefix="(" suffix=")" suffixOverrides="," >
@@ -234,7 +234,7 @@
<select id="listByAdmin" resultMap="BaseResultMap" parameterType="map">
SELECT
- <include refid="Base_Column_List"/>
+ *
FROM user_withdraw
where 1=1
<if test="agentId != null and agentId != ''">
--
Gitblit v1.9.3