新版仿ok交易所-后端
zyy
2025-10-23 07ffe1dc04495e2584fb714ca52bf8801053d1d9
trading-order-admin/src/main/java/com/yami/trading/api/controller/KlineController.java
@@ -51,9 +51,8 @@
    @GetMapping(HOBI + "getKline.action")
    public Result<List<Map<String, Object>>> getKline(@RequestParam String symbol, @RequestParam String line) {
        ResultObject resultObject = new ResultObject();
        throw new YamiShopBindException("k线图获取失败");
        // 1min, 5min, 15min, 30min, 60min, 4hour, 1day, 1mon, 1week
        /*try {
        try {
            if ("1quarter".equalsIgnoreCase(line)) {
                line = Kline.PERIOD_QUARTER;
            }
@@ -65,17 +64,17 @@
            Item item = itemService.findBySymbol(symbol);
            if (item != null) {
                if (item.getType().equals(Item.cryptos) && (item.getCurrencyType() != null && item.getCurrencyType() == 1)) {
                    *//*QueryWrapper<Ico> iQuery  = new QueryWrapper<>();
                    /*QueryWrapper<Ico> iQuery  = new QueryWrapper<>();
                    iQuery.eq("symbol", symbol);
                    iQuery.eq("symbol_data", item.getSymbolData());
                    Ico ico = icoService.getOne(iQuery);
                    if (ico != null) {
                        long now = ico.getMarketDate().getTime();*//*
                        long now = item.getCreateTimeTs() * 1000;
                        data = data.stream().filter(kline -> kline != null
                                        && kline.getTs() != null
                                        && kline.getTs() > now)
                                .collect(Collectors.toList());
                        long now = ico.getMarketDate().getTime();*/
                    long now = item.getCreateTimeTs() * 1000;
                    data = data.stream().filter(kline -> kline != null
                                    && kline.getTs() != null
                                    && kline.getTs() > now)
                            .collect(Collectors.toList());
                    //}
                }
            }
@@ -100,7 +99,7 @@
        } catch (Exception e) {
            logger.error("getKline error", e);
            throw new YamiShopBindException("k线图获取失败");
        }*/
        }
    }
    private List<Map<String, Object>> build(List<Kline> data, String line, String symbol) {