新版仿ok交易所-后端
1
zj
2026-05-21 31e6203a5bb778ad9d1c599171606c89c8edd3a3
trading-order-huobi/src/main/java/com.yami.trading.huobi/data/internal/AdjustmentValueServiceImpl.java
@@ -50,16 +50,18 @@
            } else {
                AdjustmentValueCache.getCurrentValue().put(symbol, currentValue.add(value));
            }
            // 马上扣除价格,避免因为数据没有拉取导致加不正确
            realtime.setClose(realtime.getClose().add(value));
            /*
             * 持久化缓存
             * 持久化到品种表(重启后 InitHandle 会加载到 AdjustmentValueCache)
             */
            Item item = this.itemService.findBySymbol(symbol);
            if (item.getAdjustmentValue().compareTo(AdjustmentValueCache.getCurrentValue().get(symbol)) != 0) {
                item.setAdjustmentValue(AdjustmentValueCache.getCurrentValue().get(symbol));
            BigDecimal cachedAdjust = AdjustmentValueCache.getCurrentValue().get(symbol);
            if (item != null && cachedAdjust != null) {
                BigDecimal itemAdjust = item.getAdjustmentValue();
                if (itemAdjust == null || itemAdjust.compareTo(cachedAdjust) != 0) {
                    item.setAdjustmentValue(cachedAdjust);
                itemService.saveOrUpdate(item);
            }
            }
        } else {
            AdjustmentValue adjustmentValue = new AdjustmentValue();