新版仿ok交易所-后端
1
zj
2025-08-13 78262545593c52fa75aa1072b864121cb918897c
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiWithdrawController.java
@@ -90,25 +90,25 @@
            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)
                .eq(CapitaltWallet::getUserId, partyId).last(" limit 1 "));
        if(capitaltWallet.getMoney().compareTo(new BigDecimal(amount)) < 0){
            throw new YamiShopBindException("可提现余额不足!");
            throw new YamiShopBindException("Insufficient available balance for withdrawal!");
        }
        this.sessionTokenService.del(session_token);