| | |
| | | sourcePro -> { |
| | | long fileId = Long.parseLong(sourcePro.getId()); |
| | | LedSFile file = xiXunFileService.getById(fileId); |
| | | sourcePro.setUrl(file.getFileUrl()); |
| | | String fileUrl = file.getFileUrl(); |
| | | String[] split = fileUrl.split("/"); |
| | | sourcePro.setId(split[split.length - 1]); |
| | | sourcePro.setMd5(file.getMd5()); |
| | | } |
| | | ); |
| | |
| | | * @param programId |
| | | * @param lightemitIds |
| | | */ |
| | | public void videoXixunPlayer(long programId, List<Long> lightemitIds) { |
| | | public List<Map> videoXixunPlayer(long programId, List<Long> lightemitIds) { |
| | | //记录操作结果 |
| | | List<Map> mapList = new ArrayList<>(); |
| | | |
| | | ProgramPro pro = new ProgramPro(); |
| | | ItemPro items = new ItemPro(); |
| | |
| | | // //这里是下方的post回调地址,需要修改IP地址 |
| | | command.setNotificationURL(""); |
| | | //资源下载链接的请求头 |
| | | command.setPreDownloadURL(""); |
| | | command.setPreDownloadURL("https://ximonsmart.oss-cn-shanghai.aliyuncs.com/"); |
| | | command.setTask(taskPro); |
| | | xixun.set_id(UUID.randomUUID().toString()); |
| | | xixun.setCommand(command); |
| | |
| | | Collection<PoleLightemitEntity> poleLightemitEntities = poleLightemitService.listByIds(lightemitIds); |
| | | |
| | | if (poleLightemitEntities != null) { |
| | | Map map; |
| | | for (PoleLightemitEntity entity : poleLightemitEntities) { |
| | | lightemitUtils.clear(entity.getLightemitControlCode()); |
| | | poleLightemitService.updateRequestBody(entity.getLightemitControlCode(), jsondata); |
| | | String post = lightemitUtils.post(realtimeServerBean.getCommand() + entity.getLightemitControlCode(), jsondata); |
| | | LogUtils.error("结果:" + post); |
| | | map = new LinkedHashMap(); |
| | | String clearResult = lightemitUtils.clear(entity.getLightemitControlCode()); |
| | | if (clearResult.contains("does not exist")) { |
| | | map.put("LightemitId", entity.getLightemitId()); |
| | | map.put("Result", "失败"); |
| | | mapList.add(map); |
| | | } else { |
| | | poleLightemitService.updateRequestBody(entity.getLightemitControlCode(), jsondata); |
| | | String post = lightemitUtils.post(realtimeServerBean.getCommand() + entity.getLightemitControlCode(), jsondata); |
| | | //{"_type":"success","_id":"ce8dc3ff-dc88-43b7-8f55-60abd8700f1a","timestamp":1653555160535} |
| | | if (post.startsWith("{") && post.endsWith("}") && post.contains("_type\":\"success")) { |
| | | map.put("LightemitId", entity.getLightemitId()); |
| | | map.put("Result", "成功"); |
| | | mapList.add(map); |
| | | } else { |
| | | map.put("LightemitId", entity.getLightemitId()); |
| | | map.put("Result", "失败"); |
| | | mapList.add(map); |
| | | } |
| | | LogUtils.error("结果:" + post); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | /** |
| | | * 熙汛节目推送日志记录结束 |
| | | */ |
| | | |
| | | return mapList; |
| | | } |
| | | |
| | | |