设备缓存增加物模型ID
This commit is contained in:
parent
cde131b48f
commit
34b44d037f
@ -7,9 +7,29 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class DeviceInfoCache {
|
||||
/**
|
||||
* 设备ID
|
||||
*/
|
||||
private Long deviceId;
|
||||
/**
|
||||
* 设备Code
|
||||
*/
|
||||
private String deviceCode;
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String deviceName;
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
private Integer objectType;
|
||||
/**
|
||||
* 父设备
|
||||
*/
|
||||
private Long parentDeviceId;
|
||||
|
||||
/**
|
||||
* 物模型ID
|
||||
*/
|
||||
private Long iotModelId;
|
||||
}
|
||||
|
@ -73,6 +73,7 @@ public class EquipmentCacheImpl implements EquipmentCache {
|
||||
deviceInfoCache.setDeviceName(equipment.getName());
|
||||
deviceInfoCache.setObjectType(equipment.getObjectType());
|
||||
deviceInfoCache.setParentDeviceId(equipment.getParentEquipmentId());
|
||||
deviceInfoCache.setIotModelId(equipment.getIotModelId());
|
||||
//如果是已经缓存过的设备直接缓存
|
||||
Integer index = deviceIdIndex.get(deviceId);
|
||||
if (index != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user