From 277b4f8a32c2332bc067a263bcce2e763e8d13aa Mon Sep 17 00:00:00 2001
From: Xiajijian <1176061145@qq.com>
Date: Wed, 21 Jan 2026 16:38:01 +0800
Subject: [PATCH] 1. 新增航线任务接口。 2. 新增查询航线任务列表接口。 3. 新增获取航线任务详细信息。 4. 新增航线任务接口。 5. 新增修改航线任务接口。 6. 新增删除航线任务接口。 7. 新增修改航线任务状态接口。 8. 优化查询分组业务逻辑。 9. 航线(kmz)对象增加航线任务ID信息。 10. 新增航线(kmz)业务增加航线任务数据加工校验相关业务逻辑。 11. 新增航向任务下航点信息业务相关接口。
---
ard-sample/src/main/java/com/ard/sample/component/websocket/enums/MessageType.java | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/ard-sample/src/main/java/com/ard/sample/component/websocket/enums/MessageType.java b/ard-sample/src/main/java/com/ard/sample/component/websocket/enums/MessageType.java
index e46ea77..4f08004 100644
--- a/ard-sample/src/main/java/com/ard/sample/component/websocket/enums/MessageType.java
+++ b/ard-sample/src/main/java/com/ard/sample/component/websocket/enums/MessageType.java
@@ -5,6 +5,10 @@
STATUS("status"),
CONTROL("control"),
PROGRESS("progress"),
+ LIVESTREAM("livestream"),
+ LIVESTATUS("livestatus"),
+ PING("ping"), // 新增心跳请求
+ PONG("pong"), // 新增心跳响应
ALL("all");
private final String type;
@@ -17,12 +21,19 @@
return type;
}
- public static MessageType fromString(String type) {
+ public static boolean fromString(String type) {
+ // 遍历MessageType枚举的所有值
for (MessageType messageType : MessageType.values()) {
+ // 如果当前枚举值的type属性与传入的type字符串忽略大小写相等
if (messageType.type.equalsIgnoreCase(type)) {
- return messageType;
+ // 返回当前枚举值
+ //return messageType;
+ return true;
}
}
- throw new IllegalArgumentException("Unknown message type: " + type);
+ // 如果遍历完所有枚举值都没有找到匹配的,则抛出异常
+ //throw new IllegalArgumentException("Unknown message type: " + type);
+ return false;
}
+
}
--
Gitblit v1.9.3