新版仿ok交易所-后端
1
zj
2025-10-12 f0f9dc07a67e9f6775a3b988740d36f101d3871a
1
2 files modified
16 ■■■■ changed files
trading-order-admin/src/main/java/com/yami/trading/api/UD/UdunClient.java 12 ●●●●● patch | view | raw | blame | history
trading-order-security-common/src/main/java/com/yami/trading/security/common/enums/CryptoCurrencyEnum.java 4 ●●●● patch | view | raw | blame | history
trading-order-admin/src/main/java/com/yami/trading/api/UD/UdunClient.java
@@ -132,9 +132,19 @@
        }
        return JSONUtil.toList(JSONUtil.parseArray(result.getData()), Coin.class);
    }
    public boolean checkSign(String timestamp, String nonce, String body, String sign) {
        String checkSign = UdunUtils.sign(merchantKey, timestamp, nonce, body);
        return checkSign.equals(sign);
    }
    public static void main(String[] args) {
        Map<String, Object> params = new HashMap<>();
        params.put("merchantId", 321176);
        params.put("showBalance", false);
        ResultMsg result = JSONUtil.toBean(UdunUtils.post("https://sig11.udun.io", "7161e42ff45204dca8b9c4e203b24f63", ApiPath.SUPPORT_COIN, JSONUtil.toJsonStr(params)), ResultMsg.class);
        if (result.getCode() != HttpStatus.HTTP_OK) {
            Console.error(JSONUtil.toJsonStr(result));
        }
        System.out.println(JSONUtil.toList(JSONUtil.parseArray(result.getData()), Coin.class));
    }
}
trading-order-security-common/src/main/java/com/yami/trading/security/common/enums/CryptoCurrencyEnum.java
@@ -23,8 +23,8 @@
    USDT_ERC20("usdt", "ERC20","USDT-ERC20"),
    ETH("eth", "ETH","ETH"),
    BTC("btc", "BTC","BTC"),
    USDC_ERC20("usdc", "ERC20","USDC-ERC20"),
    USDC_TRC20("usdc", "TRC20","USDC-TRC20");
    USDC_ERC20("usdc", "ERC20","USDC"),
    USDC_TRC20("usdc", "TRC20","TRX");
    private final String coin;