新版仿ok交易所-后端
1
zyy
2025-09-22 8d724caa618ff9d313c261ce8b52aed7566d57a4
trading-order-admin/src/main/java/com/yami/trading/admin/task/RealtimePushJob.java
@@ -10,6 +10,7 @@
import com.yami.trading.common.util.MarketOpenChecker;
import com.yami.trading.common.util.ThreadUtils;
import com.yami.trading.common.web.ResultObject;
import com.yami.trading.huobi.data.AdjustmentValueCache;
import com.yami.trading.huobi.data.DataCache;
import com.yami.trading.service.item.ItemService;
import lombok.extern.slf4j.Slf4j;
@@ -119,6 +120,12 @@
        map.put("close", realtime.getClose());
        map.put("high", realtime.getHigh());
        map.put("low", realtime.getLow());
        BigDecimal currentValue = AdjustmentValueCache.getCurrentValue().get(symbol);
        if (currentValue != null) {
            map.put("low", realtime.getLow().add(currentValue));
        }
        if( realtime.getVolume() != null){
            map.put("volume", realtime.getVolume().setScale(2, RoundingMode.HALF_UP));
        }else{
@@ -164,6 +171,10 @@
                map.put("high", high != null ? high.setScale(decimal, RoundingMode.HALF_UP) : null);
                BigDecimal low = realtime.getLow();
                map.put("low", low != null ? low.setScale(decimal, RoundingMode.HALF_UP) : null);
                if (currentValue != null) {
                    map.put("low", low != null ? low.add(currentValue).setScale(decimal, RoundingMode.HALF_UP) : null);
                }
            }
        }