Commit 0552ff9a authored by kinky2014's avatar kinky2014

视频接口增加截图

parent 6727088e
......@@ -68,12 +68,13 @@ public class CylinderUnitVideoServiceImpl extends BaseService<CylinderUnitVideoD
String accessToken = objTokenJson.get("accessToken").toString();
System.out.println(accessToken);
String channelNos = cylinderUnitVideo.getChannelNo();
List<String> channelNoList = Arrays.asList(channelNos.split(","));
for (String channelNo : channelNoList) {
List<CommonVideoDto> channelNoList = JSONObject.parseArray(channelNos, CommonVideoDto.class);
// List<String> channelNoList = Arrays.asList(channelNos.split(","));
for (CommonVideoDto channelNo : channelNoList) {
HashMap<String, Object> requestVideosInfo = new HashMap<>();
requestVideosInfo.put("accessToken",accessToken);
requestVideosInfo.put("deviceSerial",cylinderUnitVideo.getDeviceSerial());
requestVideosInfo.put("channelNo",channelNo);
requestVideosInfo.put("channelNo",channelNo.getKey());
requestVideosInfo.put("protocol",cylinderUnitVideo.getProtocol());
requestVideosInfo.put("expireTime",cylinderUnitVideo.getExpireTime());
String videoData = HttpUtil.post(cylinderUnitVideo.getUrl(),requestVideosInfo);
......@@ -90,9 +91,10 @@ public class CylinderUnitVideoServiceImpl extends BaseService<CylinderUnitVideoD
String url = dd.get("url").toString();
CommonVideoDto commonVideoDto = new CommonVideoDto();
commonVideoDto.setUrl(url);
commonVideoDto.setKey(channelNo);
commonVideoDto.setKey(channelNo.getKey());
commonVideoDto.setType(CommonVideoEnum.getEnum(cylinderUnitVideo.getProtocol()).getName());
commonVideoDto.setTitle(cylinderUnitVideo.getTitle());
commonVideoDto.setTitle(channelNo.getTitle());
commonVideoDto.setThumb(channelNo.getThumb());
result.add(commonVideoDto);
}
}
......
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 to comment