From 5be6cacbb75914e146c78df15a55ef9f520b3e8f Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Sat, 13 Dec 2025 22:19:15 +0800
Subject: [PATCH] feat(okxNewPrice): 启用关键业务日志记录功能

---
 src/main/java/com/xcong/excoin/modules/okxNewPrice/celue/CaoZuoServiceImpl.java |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/okxNewPrice/celue/CaoZuoServiceImpl.java b/src/main/java/com/xcong/excoin/modules/okxNewPrice/celue/CaoZuoServiceImpl.java
index 7abe812..3d35ad0 100644
--- a/src/main/java/com/xcong/excoin/modules/okxNewPrice/celue/CaoZuoServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/okxNewPrice/celue/CaoZuoServiceImpl.java
@@ -46,7 +46,8 @@
             log.info("账户通道未就绪,取消发送");
             return null;
         }
-        BigDecimal positionsReadyState = PositionsWs.POSITIONSWSMAP.get(CoinEnums.READY_STATE.name());
+        BigDecimal positionsReadyState = PositionsWs.POSITIONSWSMAP.get(CoinEnums.READY_STATE.name()) == null
+                ? BigDecimal.ZERO : PositionsWs.POSITIONSWSMAP.get(CoinEnums.READY_STATE.name());
         if (WsMapBuild.parseBigDecimalSafe(CoinEnums.READY_STATE_YES.getCode()).compareTo(positionsReadyState) != 0) {
             log.info("仓位通道未就绪,取消发送");
             return null;
@@ -127,13 +128,13 @@
             // 处理订单价格在队列中的情况
             String orderPrice = OrderInfoWs.ORDERINFOWSMAP.get("orderPrice");
             handleOrderPriceInQueues(orderPrice, queueKaiCang, queuePingCang);
-            boolean orderPriceFlag = WsMapBuild.saveStringToMap(OrderInfoWs.ORDERINFOWSMAP, "orderPrice", String.valueOf(markPx));
+            WsMapBuild.saveStringToMap(OrderInfoWs.ORDERINFOWSMAP, "orderPrice", String.valueOf(markPx));
             // 判断是加仓还是减仓
             if (avgPx.compareTo(markPx) > 0) {
                 log.info("开始加仓...");
                 if (queueKaiCang.isEmpty()) {
                     // 队列为空
-                    log.info("开始加仓,但是超出了网格设置...");
+//                    log.info("开始加仓,但是超出了网格设置...");
                     return OrderParamEnums.HOLDING.getValue();
                 }
                 DescBigDecimal kaiCang = queueKaiCang.peek();

--
Gitblit v1.9.1