From 2af15077fb2e66500e955ffebc44ecad42e2dd66 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Tue, 19 May 2026 11:18:56 +0800
Subject: [PATCH] feat(ws): 添加订单更新ID日志记录功能

---
 src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java b/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
index 0206cd3..ddbe3b9 100644
--- a/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
+++ b/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
@@ -619,6 +619,24 @@
                 contract, orderId, price, size, role, fee);
     }
 
+    /**
+     * 自动订单(条件单)状态变更回调。
+     * 由 {@link com.xcong.excoin.modules.gateApi.wsHandler.handler.AutoOrdersChannelHandler}
+     * 在收到 {@code futures.autoorders} 推送时调用。
+     *
+     * @param orderId   条件单 ID
+     * @param status    订单状态(open / finished / cancelled)
+     * @param reason    变更原因
+     * @param orderType 订单类型(plan-close-long-position 等)
+     */
+    public void onAutoOrder(String orderId, String status, String reason, String orderType) {
+        if (state == StrategyState.STOPPED) {
+            return;
+        }
+        log.info("[Gate] 条件单状态变更, id:{}, status:{}, reason:{}, order_type:{}",
+                orderId, status, reason, orderType);
+    }
+
     // ---- 网格队列处理 ----
 
     /**

--
Gitblit v1.9.1