From f620192bcac7f5cb910a99e092edcee00280ce10 Mon Sep 17 00:00:00 2001
From: zyy <zyy@email.com>
Date: Sat, 11 Oct 2025 18:39:54 +0800
Subject: [PATCH] 充值提现修改

---
 trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiWithdrawController.java |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiWithdrawController.java b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiWithdrawController.java
index 6c46c49..234bde5 100644
--- a/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiWithdrawController.java
+++ b/trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiWithdrawController.java
@@ -106,19 +106,19 @@
                 throw new YamiShopBindException("系统参数错误");
             }
 
-//        if ("true".equals(exchange_withdraw_need_safeword)) {
-//
-//            if (StringUtils.isEmptyString(safeword)) {
-//                throw new YamiShopBindException("资金密码不能为空");
-//            }
-//
-//            if (safeword.length() < 6 || safeword.length() > 12) {
-//                throw new YamiShopBindException("资金密码必须6-12位");
-//            }
-//            if (!userService.checkLoginSafeword(SecurityUtils.getUser().getUserId(),safeword)){
-//                throw new YamiShopBindException("资金密码错误");
-//            }
-//        }
+        if ("true".equals(exchange_withdraw_need_safeword)) {
+
+            if (StringUtils.isEmptyString(safeword)) {
+                throw new YamiShopBindException("资金密码不能为空");
+            }
+
+            if (safeword.length() < 6 || safeword.length() > 12) {
+                throw new YamiShopBindException("资金密码必须6-12位");
+            }
+            if (!userService.checkLoginSafeword(SecurityUtils.getUser().getUserId(),safeword)){
+                throw new YamiShopBindException("资金密码错误");
+            }
+        }
 
             // 获取资金账户(capital)
             CapitaltWallet capitaltWallet = capitaltWalletService.getOne(new LambdaQueryWrapper<>(CapitaltWallet.class)
@@ -136,20 +136,20 @@
             withdraw.setTx("");
 
             //获取商户支持币种
-            List<Coin> coinList = udunClient.listSupportCoin(false);
+            /*List<Coin> coinList = udunClient.listSupportCoin(false);
             String channelName = channel.replace("_", "");
             Coin coin = coinList.stream().filter(x -> x.getName().replace("-","").equals(channelName)).findFirst().orElse(null);
             if (coin == null) {
                 throw new YamiShopBindException("不支持的提现币种");
-            }
+            }*/
             // 保存
             this.withdrawService.saveApply(withdraw, channel, null);
-            ResultMsg resultMsg = udunClient.withdraw(from, withdraw.getVolume(), coin.getMainCoinType(),
+            /*ResultMsg resultMsg = udunClient.withdraw(from, withdraw.getVolume(), coin.getMainCoinType(),
                     coin.getCoinType(), withdraw.getOrderNo(), null);
             if (resultMsg.getCode() != HttpStatus.HTTP_OK) {
                 log.error("withdraw:{}", JSONUtil.toJsonStr(resultMsg));
                 throw new UdunException(resultMsg.getCode(), resultMsg.getMessage());
-            }
+            }*/
             resultObject.setCode(0);
         } catch (YamiShopBindException e) { // 1. 显式捕获业务异常,优先处理
             resultObject.setCode(1);

--
Gitblit v1.9.3