From 1a0d805f48d7b2f5d301cacc3fe5e11e6ddccffb Mon Sep 17 00:00:00 2001
From: zhaowenyu <35589726@qq.com>
Date: Mon, 08 Dec 2025 10:34:57 +0800
Subject: [PATCH] 2025-12-07 zwy 修改Hms中字段名为驼峰式。
---
ard-sample/src/main/java/com/ard/sample/manage/model/receiver/BatteryStateReceiver.java | 39 +++++++++++++++++++++++++++++++++++++++
1 files changed, 39 insertions(+), 0 deletions(-)
diff --git a/ard-sample/src/main/java/com/ard/sample/manage/model/receiver/BatteryStateReceiver.java b/ard-sample/src/main/java/com/ard/sample/manage/model/receiver/BatteryStateReceiver.java
index 098b116..eae269a 100644
--- a/ard-sample/src/main/java/com/ard/sample/manage/model/receiver/BatteryStateReceiver.java
+++ b/ard-sample/src/main/java/com/ard/sample/manage/model/receiver/BatteryStateReceiver.java
@@ -1,5 +1,6 @@
package com.ard.sample.manage.model.receiver;
+import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import lombok.Data;
@@ -13,22 +14,60 @@
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
public class BatteryStateReceiver {
+ //zwy 2025-10-14 修改增加注解对应json字段
+
+ /**
+ * 固件版本 text
+ * */
+ @JsonProperty("firmware_version")
private String firmwareVersion;
+ /**
+ * 电池序号 int {"min":"0"}
+ * */
+ @JsonProperty("index")
private Integer index;
+ /**
+ * 电池循环次数 int
+ * */
+ @JsonProperty("loop_times")
private Integer loopTimes;
+ /**
+ * 电池剩余电量 int {"max":100,"min":0}
+ * */
+ @JsonProperty("capacity_percent")
private Integer capacityPercent;
+ /**
+ * 电池序列号(SN) text
+ * */
+ @JsonProperty("sn")
private String sn;
+ /**
+ * 电池子类型 enum_int {}
+ * */
+ @JsonProperty("sub_type")
private Integer subType;
+ /**
+ * 温度 float {"unit_name":"摄氏度 / °C"}
+ * */
+ @JsonProperty("temperature")
private Float temperature;
+ /**
+ * 电池类型 enum_int {}
+ * */
+ @JsonProperty("type")
private Integer type;
+ /**
+ * 电压 int {"unit_name":"毫伏 / mV"}
+ * */
+ @JsonProperty("voltage")
private Integer voltage;
}
\ No newline at end of file
--
Gitblit v1.9.3