From decfc2ff7244cec365d3f32a5090edf5faeae861 Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Wed, 23 Apr 2025 19:08:18 +0800
Subject: [PATCH] 1

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

diff --git a/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java b/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java
index e88285a..24565fa 100644
--- a/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java
+++ b/src/main/java/com/nq/service/impl/UserWithdrawServiceImpl.java
@@ -5,6 +5,7 @@
 import com.google.gson.Gson;
 import com.nq.dao.*;
 import com.nq.enums.EConfigKey;
+import com.nq.enums.EStockType;
 import com.nq.enums.EUserAssets;
 import com.nq.pay.PayUtil;
 import com.nq.pojo.*;
@@ -94,6 +95,9 @@
     @Autowired
     UserAssetsMapper userAssetsMapper;
 
+    @Autowired
+    UserAssetsServices userAssetsServices;
+
     @Resource
     StockTimeSettingMapper stockTimeSettingMapper;
 
@@ -168,7 +172,7 @@
     }
 
     private boolean getServerResponse() {
-        StockTimeSetting stockTimeSetting = stockTimeSettingMapper.selectOne(new QueryWrapper<StockTimeSetting>().eq("accets_type","IN"));
+        StockTimeSetting stockTimeSetting = stockTimeSettingMapper.selectOne(new QueryWrapper<StockTimeSetting>().eq("accets_type", EStockType.ST.getCode()));
         if(stockTimeSetting == null){
             return false;
         }
@@ -236,7 +240,7 @@
             User user = this.userMapper.selectById(userWithdraw.getUserId());
 
 
-            UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId("IN", user.getId());
+            UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId(EStockType.ST.getCode(), user.getId());
             if (userAssets == null) {
                 return ServerResponse.createByErrorMsg("用户资金账户不存在");
             }
@@ -330,6 +334,7 @@
     }
 
 
+    @Transactional
     public ServerResponse updateState(Integer withId, Integer state, String authMsg) throws Exception {
         UserWithdraw userWithdraw = this.userWithdrawMapper.selectByPrimaryKey(withId);
         SiteSetting siteSetting = siteSettingService.getSiteSetting();
@@ -348,7 +353,7 @@
         if (user == null) {
             return ServerResponse.createByErrorMsg("用户不存在");
         }
-        UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId("IN", user.getId());
+        UserAssets userAssets = iUserAssetsServices.assetsByTypeAndUserId(EStockType.ST.getCode(), user.getId());
         if (userAssets == null) {
             return ServerResponse.createByErrorMsg("用户资金账户不存在");
         }

--
Gitblit v1.9.3