新版仿ok交易所-后端
1
zj
2025-10-30 14c1946eae86a86f8d1edee6cf3bdaf7572fc966
trading-order-huobi/src/main/java/com.yami.trading.huobi/data/job/AbstractGetDataJob.java
@@ -76,7 +76,7 @@
                        AdjustmentValueCache.getDelayValue().remove(symbol);
                    } else {
                        // 本次调整值
                        BigDecimal currentValue_frequency = delayValue.getValue().divide(new BigDecimal(frequency), decimal, RoundingMode.HALF_UP);
                        BigDecimal currentValue_frequency = delayValue.getValue().divide(new BigDecimal(frequency), decimal, RoundingMode.DOWN);
                        if (currentValue == null) {
                            AdjustmentValueCache.getCurrentValue().put(symbol, currentValue_frequency);
@@ -99,14 +99,14 @@
                currentValue = AdjustmentValueCache.getCurrentValue().get(realtime.getSymbol());
                if (currentValue != null && currentValue.compareTo(BigDecimal.ZERO) != 0) {
                    realtime.setClose(realtime.getClose().add(currentValue).setScale(decimal, RoundingMode.HALF_UP));
                    realtime.setClose(realtime.getClose().add(currentValue).setScale(decimal, RoundingMode.DOWN));
                    BigDecimal ask = realtime.getAsk();
                    if(ask!=null){
                        realtime.setAsk(ask.add(currentValue).setScale(decimal, RoundingMode.HALF_UP));
                        realtime.setAsk(ask.add(currentValue).setScale(decimal, RoundingMode.DOWN));
                    }
                    BigDecimal bid = realtime.getBid();
                    if(bid!=null){
                        realtime.setBid(bid.add(currentValue).setScale(decimal, RoundingMode.HALF_UP));
                        realtime.setBid(bid.add(currentValue).setScale(decimal, RoundingMode.DOWN));
                    }
                    // realtime.setVolume(Arith.add(realtime.getVolume(), Arith.mul(Arith.div(currentValue, realtime.getClose()), realtime.getVolume())));
                    // realtime.setAmount(Arith.add(realtime.getAmount(), Arith.mul(Arith.div(currentValue, realtime.getClose()), realtime.getAmount())));