新版仿ok交易所-后端
1
zyy
2025-09-23 b011546dbdff18eadf1843cda4ecc6b5b5f87de1
1
1 files modified
13 ■■■■■ changed files
trading-order-admin/src/main/java/com/yami/trading/admin/task/RealtimePushJob.java 13 ●●●●● patch | view | raw | blame | history
trading-order-admin/src/main/java/com/yami/trading/admin/task/RealtimePushJob.java
@@ -125,6 +125,13 @@
        if (currentValue != null) {
            map.put("low", realtime.getLow().add(currentValue));
        }
        if (currentValue != null) {
            BigDecimal newLow = realtime.getLow().add(currentValue);
            if (newLow.compareTo(realtime.getHigh()) > 0) {
                map.put("high", realtime.getHigh().add(currentValue));
            }
            map.put("low", newLow);
        }
        if( realtime.getVolume() != null){
            map.put("volume", realtime.getVolume().setScale(2, RoundingMode.HALF_UP));
@@ -172,7 +179,11 @@
                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);
                    BigDecimal newLow = low != null ? low.add(currentValue).setScale(decimal, RoundingMode.HALF_UP) : BigDecimal.ZERO;
                    if (newLow.compareTo(high) > 0) {
                        map.put("high", high.add(currentValue).setScale(decimal, RoundingMode.HALF_UP));
                    }
                    map.put("low", newLow);
                }
            }