From 0f3d23847ceda5fc72bb6a971ffdfaf881631b95 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Wed, 07 Jan 2026 14:26:48 +0800
Subject: [PATCH] fix(okxNewPrice): 修复止损逻辑并添加价格比较日志

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

diff --git a/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/AccountWs.java b/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/AccountWs.java
index 3d5fe77..3828eda 100644
--- a/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/AccountWs.java
+++ b/src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/AccountWs.java
@@ -55,14 +55,12 @@
             String connId = MallUtils.getOrderNum(ACCOUNTWS_CHANNEL);
             JSONObject jsonObject = WsParamBuild.buildJsonObject(connId, option, argsArray);
             webSocketClient.send(jsonObject.toJSONString());
-//            log.info("发送账户频道:{}", option);
         } catch (Exception e) {
             log.error("订阅账户频道构建失败", e);
         }
     }
 
     public static void initEvent(JSONObject response, String accountName) {
-//        log.info("订阅成功: {}", response.getJSONObject("arg"));
         JSONObject arg = response.getJSONObject("arg");
         initParam(arg, accountName);
     }
@@ -76,7 +74,6 @@
     public static void handleEvent(JSONObject response, String accountName) {
 
 
-//        log.info("开始执行AccountWs......{}",ACCOUNTWS_CHANNEL);
         try {
             JSONArray dataArray = response.getJSONArray("data");
             if (dataArray == null || dataArray.isEmpty()) {
@@ -141,6 +138,7 @@
         String total_order_usdtpecent = InstrumentsWs.getAccountMap(accountName).get(CoinEnums.TOTAL_ORDER_USDTPECENT.name());
         BigDecimal total_order_usdt_factor = WsMapBuild.parseBigDecimalSafe(total_order_usdtpecent);
         BigDecimal totalOrderUsdt = cashBalDecimal.multiply(total_order_usdt_factor).setScale(2, RoundingMode.DOWN);
+        totalOrderUsdt = totalOrderUsdt.divide(new BigDecimal("2"), RoundingMode.DOWN);
         WsMapBuild.saveStringToMap(accountMap, CoinEnums.TOTAL_ORDER_USDT.name(), String.valueOf(totalOrderUsdt));
 
         /**

--
Gitblit v1.9.1