新版仿ok交易所-后端
zyy
2025-10-28 e84b3c45f7ecef39926b582b10d03b30ff77ee95
trading-order-admin/src/main/java/com/yami/trading/api/controller/KlineController.java
@@ -8,6 +8,7 @@
import com.yami.trading.common.exception.YamiShopBindException;
import com.yami.trading.common.util.DateUtils;
import com.yami.trading.common.web.ResultObject;
import com.yami.trading.huobi.data.AdjustmentValueCache;
import com.yami.trading.huobi.data.internal.KlineService;
import com.yami.trading.service.data.DataService;
import com.yami.trading.service.etf.MarketService;
@@ -95,6 +96,23 @@
                            DateUtils.timeStamp2Date(String.valueOf(datum.getTs()), "MM-dd HH:mm"));
                }
            }
            /*BigDecimal currentValue = AdjustmentValueCache.getCurrentValue().get(symbol);
            if (currentValue != null) {
                data.forEach(kline -> {
                    *//*logger.info("==currentValue==close:{}, low:{}, high:{}, open:{}, currentValue:{}",
                            kline.getClose(), kline.getLow(), kline.getHigh(), kline.getOpen(), currentValue);*//*
                    if (!kline.isAdjusted()){
                        if (kline.getClose().compareTo(kline.getLow()) >= 0 && kline.getClose().compareTo(kline.getHigh()) <= 0) {
                            kline.setClose(kline.getClose().add(currentValue));
                        }
                        kline.setOpen(kline.getOpen().add(currentValue));
                        kline.setLow(kline.getLow().add(currentValue));
                        kline.setHigh(kline.getHigh().add(currentValue));
                        kline.setAdjusted(true);
                    }
                });
            }*/
            return Result.succeed(this.build(data, line, symbol));
        } catch (Exception e) {
            logger.error("getKline error", e);