新版仿ok交易所-后端
C2C
zyy
2025-10-27 d94a5b9c4c4b7f64eae59b19be2bb5019786b865
trading-order-admin/src/main/java/com/yami/trading/admin/task/RealtimeWebsocketServer.java
@@ -30,7 +30,7 @@
import java.util.stream.Collectors;
/**
 *
 *
 * 深度、近期交易记录 websocket启动服务
 */
@Component
@@ -113,8 +113,10 @@
         if (currentValue != null && currentValue != 0) {
            realtime.setClose(new BigDecimal(Arith.add(close, currentValue.doubleValue())));
            realtime.setVolume(new BigDecimal(Arith.add(vol, Arith.mul(Arith.div(currentValue, close), vol))));
            realtime.setAmount(new BigDecimal(Arith.add(amount, Arith.mul(Arith.div(currentValue, close), amount))));
            //realtime.setVolume(new BigDecimal(Arith.add(vol, Arith.mul(Arith.div(currentValue, close), vol))));
            //realtime.setAmount(new BigDecimal(Arith.add(amount, Arith.mul(Arith.div(currentValue, close), amount))));
            realtime.setHigh(realtime.getHigh().add(BigDecimal.valueOf(currentValue)));
            realtime.setLow(realtime.getLow().add(BigDecimal.valueOf(currentValue)));
         }
         Double high = DataCache.getRealtimeHigh().get(symbol);
@@ -135,13 +137,13 @@
               realtime.setAmount(realtime.getAmount().multiply(item.getMultiple()));
            }
            if (high != null && high >= realtime.getClose().doubleValue()) {
            /*if (high != null && high >= realtime.getClose().doubleValue()) {
               realtime.setHigh(new BigDecimal(high));
            }
            if (low != null && low <= realtime.getClose().doubleValue()) {
               realtime.setLow(new BigDecimal(low));
            }
            }*/
            /*ouble h24Before = DataCache.getRealtime24HBeforeOpen().get(symbol);
            if (h24Before != null) {