#修复设备管理的接口和现有的厂家做兼容(sql中修改表名字+字段id)
This commit is contained in:
@@ -26,9 +26,9 @@ import java.util.List;
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "Device", description = "设备对象 iot_device")
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonInclude(JsonInclude.Include.ALWAYS)
|
||||
@Data
|
||||
@TableName("iot_device")
|
||||
@TableName(value = "iot_device")
|
||||
public class Device extends BaseDO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -260,4 +260,8 @@ public class Device extends BaseDO {
|
||||
@TableField(exist = false)
|
||||
private DeviceRunningStatusHistory lastRunningStatus;
|
||||
|
||||
public DeviceRunningStatusHistory getLastRunningStatus() {
|
||||
return lastRunningStatus != null ? lastRunningStatus : new DeviceRunningStatusHistory();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ public class Product extends BaseDO {
|
||||
|
||||
private String subscribeTopic;
|
||||
|
||||
private Integer deviceType;
|
||||
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private Map<String, Object> thingsModels;
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
package com.maibu.core.business.dto;
|
||||
@@ -19,9 +19,15 @@ public class GlobalMemory {
|
||||
|
||||
|
||||
// orgId - siteId - deviceId
|
||||
public static ConcurrentHashMap<Long, IoTCommonDevice> unRegisterCommonDeviceMap = new ConcurrentHashMap<>();
|
||||
// public static ConcurrentHashMap<Long, IoTCommonDevice> unRegisterCommonDeviceMap = new ConcurrentHashMap<>();
|
||||
//
|
||||
// public static ConcurrentHashMap<Long, Device> unRegisterDeviceMap = new ConcurrentHashMap<>();
|
||||
|
||||
// orgId - siteId - deviceId
|
||||
public static ConcurrentHashMap<String, IoTCommonDevice> unRegisterCommonDeviceMap = new ConcurrentHashMap<>();
|
||||
|
||||
public static ConcurrentHashMap<String, Device> unRegisterDeviceMap = new ConcurrentHashMap<>();
|
||||
|
||||
public static ConcurrentHashMap<Long, Device> unRegisterDeviceMap = new ConcurrentHashMap<>();
|
||||
|
||||
// key:orgId - siteId
|
||||
public static ConcurrentHashMap<Long, Map<Long, SiteMemory>> orgAttrs = new ConcurrentHashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user