新版仿ok交易所-后端
1
zj
2025-09-10 81cfec3a4f79e98fd6ae727e0f27aa443c89169a
trading-order-service/src/main/java/com/yami/trading/service/impl/WithdrawServiceImpl.java
@@ -124,7 +124,7 @@
        Withdraw withdraw = getById(id);
        if (withdraw.getStatus() == 2 ) {// 通过后不可驳回
            return;
            throw new YamiShopBindException("订单已操作,请不要重复操作!");
        }
        Date date = new Date();
        withdraw.setReviewTime(date);
@@ -135,10 +135,12 @@
        String symbol = "";
        if (withdraw.getMethod().indexOf("BTC") != -1) {
            symbol = "btc";
                symbol = "btcusdt";
        } else if (withdraw.getMethod().indexOf("ETH") != -1) {
            symbol = "eth";
        } else {
            symbol = "ethusdt";
        } else if(withdraw.getMethod().indexOf("USDC") != -1){
            symbol = "usdcusdt";
        }else {
            symbol = "usdt";
        }
        if ("usdt".equals(symbol)) {
@@ -155,7 +157,7 @@
                throw new YamiShopBindException("用户资金账户不存在!");
            }
            capitaltWalletService.update(new LambdaUpdateWrapper<CapitaltWallet>()
                    .set(CapitaltWallet::getMoney,new BigDecimal(Arith.add(capitaltWallet.getMoney().doubleValue(), amount_before)))
                    .set(CapitaltWallet::getMoney,new BigDecimal(Arith.add(capitaltWallet.getMoney(), withdraw.getVolume())))
                    .eq(CapitaltWallet::getUserId,wallet.getUserId()));
@@ -210,7 +212,6 @@
        logService.save(log);
        tipService.deleteTip(withdraw.getUuid().toString());
    }
    @Override
    public long waitCount() {
        return count(Wrappers.<Withdraw>query().lambda().eq(Withdraw::getStatus, 0));
@@ -435,6 +436,9 @@
            return;
        } else if (channel.indexOf("ETH") != -1) {
            saveApplyOtherChannel(withdraw, "ethusdt");
            return;
        }else if(channel.indexOf("USDC") != -1){
            saveApplyOtherChannel(withdraw, "usdcusdt");
            return;
        }
        User party = userService.getById(withdraw.getUserId());
@@ -677,7 +681,7 @@
        if(ObjectUtil.isEmpty(capitaltWallet)){
            throw new YamiShopBindException("The user's funds account does not exist!");
        }
        capitaltWalletService.update(capitaltWallet,-withdraw.getAmount().doubleValue());
        capitaltWalletService.update(capitaltWallet,-withdraw.getVolume().doubleValue());
        save(withdraw);