From 103ca74d9b67ce4f766b5f77451741a76fa696b9 Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期日, 22 三月 2026 09:50:10 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/trace/StationTaskTraceRegistry.java | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/zy/core/trace/StationTaskTraceRegistry.java b/src/main/java/com/zy/core/trace/StationTaskTraceRegistry.java
index 35834e8..1751be6 100644
--- a/src/main/java/com/zy/core/trace/StationTaskTraceRegistry.java
+++ b/src/main/java/com/zy/core/trace/StationTaskTraceRegistry.java
@@ -637,12 +637,12 @@
Map<String, Object> details) {
boolean active = Boolean.TRUE.equals(loopAlertActive)
&& loopAlertCount != null
- && loopAlertCount > 1
+ && loopAlertCount > 2
&& loopAlertText != null
&& !loopAlertText.trim().isEmpty();
String nextType = active ? loopAlertType : null;
String nextText = active ? loopAlertText.trim() : null;
- Integer nextCount = active ? loopAlertCount : null;
+ Integer nextCount = loopAlertCount != null && loopAlertCount > 0 ? loopAlertCount : null;
boolean changed = !Objects.equals(this.loopAlertActive, active)
|| !Objects.equals(this.loopAlertType, nextType)
|| !Objects.equals(this.loopAlertText, nextText)
@@ -810,13 +810,15 @@
}
private void appendLoopHintDetails(Map<String, Object> details) {
- if (details == null || !Boolean.TRUE.equals(this.loopAlertActive) || this.loopAlertCount == null || this.loopAlertCount <= 1) {
+ if (details == null || this.loopAlertCount == null || this.loopAlertCount <= 0) {
return;
}
- details.put("loopAlertActive", Boolean.TRUE);
- details.put("loopAlertType", this.loopAlertType);
- details.put("loopAlertText", this.loopAlertText);
details.put("loopAlertCount", this.loopAlertCount);
+ if (Boolean.TRUE.equals(this.loopAlertActive)) {
+ details.put("loopAlertActive", Boolean.TRUE);
+ details.put("loopAlertType", this.loopAlertType);
+ details.put("loopAlertText", this.loopAlertText);
+ }
}
private boolean acceptTraceVersion(Integer incomingTraceVersion) {
--
Gitblit v1.9.1