Commit d1825ad4 by huangjy

feat,先只读取上报的日志

parent 1734bbd9
......@@ -28,6 +28,7 @@ import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.List;
import java.util.stream.Collectors;
/**
* iot产品设备相关接口
......@@ -252,8 +253,9 @@ public class IotProductDeviceService extends IotCommonService {
if (responseMessage.getStatus() == 200) {
IotPagerResult pagerResult = JSON.parseObject(responseMessage.getResult().toString(), IotPagerResult.class);
List<DeviceOperationLogEntity> deviceOperationLogEntities = JSONArray.parseArray(pagerResult.getData().toString()).toJavaList(DeviceOperationLogEntity.class);
return deviceOperationLogEntities.stream().filter(deviceOperationLogEntity -> deviceOperationLogEntity.getType().contains("reportProperty"))
.collect(Collectors.toList());
//Map maps = (Map) JSON.parse(datum.getContent().toString());
return deviceOperationLogEntities;
}
log.error("获取设备接口失败:{}", responseMessage.getMessage());
} catch (IOException e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment