TRX 1 жил өмнө
parent
commit
36913b5675

+ 7 - 0
src/main/java/com/github/microservice/busInfoModel/device/DeviceInfoModel.java

@@ -80,6 +80,13 @@ public class DeviceInfoModel extends SuperModel {
     @Schema(description = "数据状态")
     private DeviceState state;
 
+    public DeviceState getState() {
+        if (state != null) {
+            return state;
+        }
+        return DeviceState.Enable;
+    }
+
     private String stateStr;
 
     public String getStateStr() {