fix(设备模块): 解决设备tag没有返回dataType字段 (#389)

This commit is contained in:
tancong 2023-08-01 16:32:44 +08:00 committed by GitHub
parent 714b2cadd2
commit 943d0739da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -65,6 +65,7 @@ public class DeviceTagEntity extends GenericEntity<String> {
@Schema(description = "说明")
private String description;
private DataType dataType;
public static DeviceTagEntity of(PropertyMetadata property) {
DeviceTagEntity entity = new DeviceTagEntity();
@ -73,6 +74,7 @@ public class DeviceTagEntity extends GenericEntity<String> {
entity.setType(property.getValueType().getId());
entity.setDescription(property.getDescription());
entity.setCreateTime(new Date());
entity.setDataType(property.getValueType());
return entity;
}