From 76388afc59b66335dcf630e5ed30beccbe7aeb5b Mon Sep 17 00:00:00 2001
From: zyy <zyy@email.com>
Date: Thu, 28 Aug 2025 17:29:05 +0800
Subject: [PATCH] 新股修改

---
 src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java b/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java
index 38b6de0..653bfc1 100644
--- a/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java
+++ b/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java
@@ -109,7 +109,7 @@
                 return ServerResponse.createByErrorMsg("最小提现金额:" + siteSetting.getWithMinAmt(),request);
             }
 
-            boolean b = getServerResponse();
+            boolean b = getServerResponse(accsetType);
             if (!b) {
                 return ServerResponse.createByErrorMsg("提现失败,当前时间已停止提现", request);
             }
@@ -133,6 +133,7 @@
             userWithdraw.setWithStatus(Integer.valueOf(0));
             BigDecimal withfee = siteSetting.getWithFeePercent().multiply(new BigDecimal(amt)).add(new BigDecimal(siteSetting.getWithFeeSingle().intValue()));
             userWithdraw.setWithFee(withfee);
+            userWithdraw.setAccsetType(accsetType);
             int insertCount = this.userWithdrawMapper.insert(userWithdraw);
             if (insertCount > 0) {
                 return ServerResponse.createBySuccessMsg("提现成功",request);
@@ -147,8 +148,8 @@
 
     }
 
-    private boolean getServerResponse() {
-        StockTimeSetting stockTimeSetting = stockTimeSettingMapper.selectOne(new QueryWrapper<StockTimeSetting>().eq("accets_type", EStockType.MX.getCode()));
+    private boolean getServerResponse(String accsetType) {
+        StockTimeSetting stockTimeSetting = stockTimeSettingMapper.selectOne(new QueryWrapper<StockTimeSetting>().eq("accets_type", accsetType));
         if (stockTimeSetting == null) {
             return false;
         }
@@ -216,7 +217,7 @@
             User user = this.userMapper.selectById(userWithdraw.getUserId());
 
 
-            UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId(EStockType.MX.getCode(), user.getId());
+            UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId(EStockType.getDefault().getCode(), user.getId());
             if (userAssets == null) {
                 return ServerResponse.createByErrorMsg("用户资金账户不存在");
             }
@@ -330,7 +331,7 @@
             if (user == null) {
                 return ServerResponse.createByErrorMsg("用户不存在");
             }
-            UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId(EStockType.MX.getCode(), user.getId());
+            UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId(EStockType.getDefault().getCode(), user.getId());
             if (userAssets == null) {
                 return ServerResponse.createByErrorMsg("用户资金账户不存在");
             }

--
Gitblit v1.9.3