新版仿ok交易所-后端
zyy
2025-10-15 2a80056c60e8a7213ca791d59a7faa15556bedf6
trading-order-admin/src/main/java/com/yami/trading/admin/task/RealtimeWebsocketServer.java
@@ -30,7 +30,7 @@
import java.util.stream.Collectors;
/**
 *
 *
 * 深度、近期交易记录 websocket启动服务
 */
@Component
@@ -93,7 +93,7 @@
         symbol = item.getSymbol();
         item = this.itemService.findBySymbol(symbol);
         //停牌时不更新
         if (itemService.isSuspended(item)) {
         if (itemService.isSuspended(symbol)) {
            return;
         }
         Double currentValue = AdjustmentValueCache.getCurrentValue().get(symbol).doubleValue();
@@ -113,8 +113,8 @@
         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))));
         }
         Double high = DataCache.getRealtimeHigh().get(symbol);
@@ -143,11 +143,14 @@
               realtime.setLow(new BigDecimal(low));
            }
            Double h24Before = DataCache.getRealtime24HBeforeOpen().get(symbol);
            /*ouble h24Before = DataCache.getRealtime24HBeforeOpen().get(symbol);
            if (h24Before != null) {
               realtime.setOpen(new BigDecimal(h24Before));
            }
            }*/
            /*if (realtime.getSymbol().equals("axsusdt")) {
               System.out.println("axsusdt2" + realtime);
            }*/
            DataCache.putRealtime(symbol, realtime);
            // System.out.println(JSONObject.toJSONString(realtime));
         }