|
|
@@ -2,6 +2,7 @@ package com.zhongshu.iot.server.core.service.iot;
|
|
|
|
|
|
import com.github.microservice.busInfoModel.device.IotTemplateSimpleModel;
|
|
|
import com.github.microservice.models.baseParam.NameModel;
|
|
|
+import com.github.microservice.models.baseParam.ValueInfoModel;
|
|
|
import com.github.microservice.net.ResultContent;
|
|
|
import com.github.microservice.net.ResultMessage;
|
|
|
import com.github.microservice.types.FunctionType;
|
|
|
@@ -662,7 +663,7 @@ public class IotServiceImpl extends SuperService {
|
|
|
return toSimpleModel(entity);
|
|
|
}
|
|
|
|
|
|
- public ResultContent<Object> getPropertyValueByIotMainId(String iotMainId) {
|
|
|
+ public ResultContent<ValueInfoModel> getPropertyValueByIotMainId(String iotMainId) {
|
|
|
if (StringUtils.isEmpty(iotMainId)) {
|
|
|
return ResultContent.buildFail("");
|
|
|
}
|
|
|
@@ -671,7 +672,9 @@ public class IotServiceImpl extends SuperService {
|
|
|
return ResultContent.buildFail("");
|
|
|
}
|
|
|
Object value = iotDeviceDataService.getDevicePropertyModel(iotMain.getDeviceId(), iotMain.getIdentifier());
|
|
|
- return ResultContent.buildSuccess(value);
|
|
|
+ ValueInfoModel model = new ValueInfoModel();
|
|
|
+ model.setValue(value);
|
|
|
+ return ResultContent.buildSuccess(model);
|
|
|
}
|
|
|
|
|
|
public IotTemplateSimpleModel toSimpleModel(IotTemplate entity) {
|