From c079d3a802f33b75923ce97478850271257d0923 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Wed, 27 May 2026 14:45:19 +0800
Subject: [PATCH] config(gateApi): 更新Gate API配置参数

---
 src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 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 71dbafd..485bbae 100644
--- a/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
+++ b/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
@@ -1,6 +1,8 @@
 package com.xcong.excoin.modules.gateApi;
 
 import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.StrUtil;
+import com.xcong.excoin.utils.dingtalk.DingTalkUtils;
 import io.gate.gateapi.ApiClient;
 import io.gate.gateapi.ApiException;
 import io.gate.gateapi.GateApiException;
@@ -546,9 +548,13 @@
                     totalPnl, cumulativePnl, unrealizedPnl);
             state = StrategyState.STOPPED;
         } else if (totalPnl.compareTo(config.getMaxLoss().negate()) <= 0) {
-            log.info("[Gate] 已达亏损上限(合计{})→已停止, 已实现:{}, 未实现:{}",
+            String logMessage = StrUtil.format("[Gate] 已达亏损风险值(合计{}), 已实现:{}, 未实现:{}",
                     totalPnl, cumulativePnl, unrealizedPnl);
-            state = StrategyState.STOPPED;
+            log.info(logMessage);
+
+
+            DingTalkUtils.getDefault().sendActionCard("风险提醒", logMessage, config.getApiKey(), "");
+//            state = StrategyState.STOPPED;
         }
     }
 

--
Gitblit v1.9.1