From 5e57de9b12ee136e45ce5754c7fe2e7eb12af05a Mon Sep 17 00:00:00 2001
From: zj <1772600164@qq.com>
Date: Fri, 12 Jun 2026 18:35:45 +0800
Subject: [PATCH] 1
---
trading-order-service/src/main/java/com/yami/trading/service/impl/WithdrawServiceImpl.java | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/trading-order-service/src/main/java/com/yami/trading/service/impl/WithdrawServiceImpl.java b/trading-order-service/src/main/java/com/yami/trading/service/impl/WithdrawServiceImpl.java
index 74e182c..9e57be0 100644
--- a/trading-order-service/src/main/java/com/yami/trading/service/impl/WithdrawServiceImpl.java
+++ b/trading-order-service/src/main/java/com/yami/trading/service/impl/WithdrawServiceImpl.java
@@ -25,6 +25,7 @@
import com.yami.trading.common.util.StringUtils;
import com.yami.trading.dao.user.WithdrawMapper;
import com.yami.trading.service.*;
+import com.yami.trading.service.notify.WalletTransactionMailNotificationService;
import com.yami.trading.service.syspara.SysparaService;
import com.yami.trading.service.system.LogService;
import com.yami.trading.service.system.TipService;
@@ -72,6 +73,8 @@
WalletLogService walletLogService;
@Autowired
LogService logService;
+ @Autowired
+ private WalletTransactionMailNotificationService walletTransactionMailNotificationService;
@Override
public Page listRecord(Page page, String status, String roleName,
@@ -117,6 +120,13 @@
log.setLog("通过提现申请。订单号[" + withdraw.getOrderNo() + "]。");
logService.save(log);
tipService.deleteTip(withdraw.getUuid().toString());
+ String asset = symbol.toUpperCase();
+ walletTransactionMailNotificationService.sendWithdrawSuccess(
+ user,
+ withdraw.getOrderNo(),
+ withdraw.getAmount(),
+ withdraw.getAmountFee(),
+ asset);
}
}
@@ -224,8 +234,8 @@
if (party_kyc==null){
party_kyc=new RealNameAuthRecord();
}
- if (!(party_kyc.getStatus() == 2) && "true".equals(sysparaService.find("withdraw_by_kyc").getSvalue())) {
- throw new YamiShopBindException("未基础认证");
+ if ("true".equals(sysparaService.find("withdraw_by_kyc").getSvalue())) {
+ realNameAuthRecordService.requireApproved(party, false);
}
double withdraw_by_high_kyc = Double.valueOf(sysparaService.find("withdraw_by_high_kyc").getSvalue());
if (withdraw_by_high_kyc > 0 && withdraw.getVolume().doubleValue() > withdraw_by_high_kyc
@@ -521,8 +531,8 @@
if (party_kyc==null){
party_kyc=new RealNameAuthRecord();
}
- if (!(party_kyc.getStatus() == 2) && "true".equals(sysparaService.find("withdraw_by_kyc").getSvalue())) {
- throw new YamiShopBindException("未基础认证");
+ if ("true".equals(sysparaService.find("withdraw_by_kyc").getSvalue())) {
+ realNameAuthRecordService.requireApproved(party, false);
}
if (party_kycHighLevel==null){
party_kycHighLevel=new HighLevelAuthRecord();
@@ -828,6 +838,9 @@
@Override
public void applyWithdraw(Withdraw withdraw, User user) {
+ if (user.getAccountType() != null && user.getAccountType() == 1) {
+ throw new YamiShopBindException("模拟账户不支持提现");
+ }
String channel = withdraw.getMethod();
BigDecimal amount = withdraw.getAmount();
String symbol = "btc";
@@ -835,8 +848,8 @@
throw new YamiShopBindException("无权限");
}
RealNameAuthRecord realNameAuthRecord = realNameAuthRecordService.getByUserId(user.getUserId());
- if (!(realNameAuthRecord.getStatus() == 2) && "true".equals(sysparaService.find("withdraw_by_kyc").getSvalue())) {
- throw new YamiShopBindException("未安全认证,无提现权限");
+ if ("true".equals(sysparaService.find("withdraw_by_kyc").getSvalue())) {
+ realNameAuthRecordService.requireApproved(user, false);
}
HighLevelAuthRecord highLevelAuthRecord = highLevelAuthRecordService.findByUserId(withdraw.getUserId());
BigDecimal withdrawByHighKyc = new BigDecimal(sysparaService.find("withdraw_by_high_kyc").getSvalue());
--
Gitblit v1.9.3