新版仿ok交易所-后端
zyy
2025-10-11 f620192bcac7f5cb910a99e092edcee00280ce10
trading-order-admin/src/main/java/com/yami/trading/api/controller/ApiWithdrawController.java
@@ -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);