1
zj
2 days ago 5e57de9b12ee136e45ce5754c7fe2e7eb12af05a
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();
@@ -838,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());