From 53196fafc8500c7fa2dafd9b3a58b5cd79972c50 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Wed, 10 Dec 2025 17:20:21 +0800
Subject: [PATCH] fix(okxWs): 修正账户和持仓WebSocket参数配置

---
 src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/TradeOrderWs.java |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/TradeOrderWs.java b/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/TradeOrderWs.java
index 093ac5e..38e0cd3 100644
--- a/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/TradeOrderWs.java
+++ b/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/TradeOrderWs.java
@@ -34,12 +34,13 @@
         String buyCntNormal = getRedisValue(redisUtils, PositionsWs.POSITIONSWS_CHANNEL, ":buyCnt");
         String pos = getRedisValue(redisUtils, PositionsWs.POSITIONSWS_CHANNEL, ":pos");
         if (OrderParamEnums.ORDERING.getValue().equals(side)) {
+            log.warn("正在下单中,等待下单结束...");
             return;
         } else if (OrderParamEnums.HOLDING.getValue().equals(side)) {
             return;
         } else if (OrderParamEnums.INIT.getValue().equals(side)) {
             side = OrderParamEnums.BUY.getValue();
-            if (StrUtil.isNotBlank(buyCntNormal) && BigDecimal.ZERO.compareTo(new BigDecimal(buyCntNormal)) > 0) {
+            if (StrUtil.isNotBlank(buyCntNormal) && new BigDecimal(buyCntNormal).compareTo(BigDecimal.ZERO) > 0) {
                 buyCnt = buyCntNormal;
             }else{
                 buyCnt = ctval;
@@ -50,7 +51,7 @@
             buyCnt = pos;
         } else if (OrderParamEnums.BUY.getValue().equals(side)){
             side = OrderParamEnums.BUY.getValue();
-            if (StrUtil.isNotBlank(buyCntNormal) && BigDecimal.ZERO.compareTo(new BigDecimal(buyCntNormal)) > 0) {
+            if (StrUtil.isNotBlank(buyCntNormal) && new BigDecimal(buyCntNormal).compareTo(BigDecimal.ZERO) > 0) {
                 buyCnt = buyCntNormal;
             }else{
                 buyCnt = ctval;

--
Gitblit v1.9.1