fix: JT808事件消息eventId改为identifier
Some checks failed
aiot-platform CI/CD / build-and-deploy (push) Has been cancelled
Some checks failed
aiot-platform CI/CD / build-and-deploy (push) Has been cancelled
This commit is contained in:
@@ -280,7 +280,7 @@ public class IotJt808DeviceMessageCodec implements IotDeviceMessageCodec {
|
||||
* <p>
|
||||
* 物模型标准格式(简化版,只保留 keyId 和 keyState):
|
||||
* {
|
||||
* "eventId": "button_event",
|
||||
* "identifier": "button_event", // 事件标识符,用于存储到数据库的 identifier 字段
|
||||
* "eventTime": 1234567890,
|
||||
* "params": {
|
||||
* "keyId": 1, // 0x01=短按1号键, 0x0B=长按1号键
|
||||
@@ -297,8 +297,8 @@ public class IotJt808DeviceMessageCodec implements IotDeviceMessageCodec {
|
||||
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
|
||||
// 统一使用一个事件标识符
|
||||
result.put("eventId", "button_event");
|
||||
// 使用 identifier 字段(符合物模型标准格式),用于存储到数据库的 identifier 字段
|
||||
result.put("identifier", "button_event");
|
||||
|
||||
// 事件时间戳
|
||||
result.put("eventTime", System.currentTimeMillis());
|
||||
|
||||
Reference in New Issue
Block a user