#修复设备管理的接口和现有的厂家做兼容(sql中修改表名字+字段id)

This commit is contained in:
2026-05-12 10:36:06 +08:00
parent a8bdcad183
commit 38bc68c926
9 changed files with 317 additions and 7 deletions

View File

@@ -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();
}
}

View File

@@ -41,6 +41,8 @@ public class Product extends BaseDO {
private String subscribeTopic;
private Integer deviceType;
@TableField(typeHandler = JacksonTypeHandler.class)
private Map<String, Object> thingsModels;

View File

@@ -0,0 +1 @@
package com.maibu.core.business.dto;

View File

@@ -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<>();