From d8d6ef0d3031053361284b04ddafb48ef99ae679 Mon Sep 17 00:00:00 2001
From: zhanzhiqin <895896009@qq.com>
Date: 星期四, 26 五月 2022 14:16:51 +0800
Subject: [PATCH] fix
---
ximon-admin/src/main/java/com/sandu/ximon/admin/service/XiXunPlayerService.java | 50 ++++++++++++++++----------------------------------
1 files changed, 16 insertions(+), 34 deletions(-)
diff --git a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/XiXunPlayerService.java b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/XiXunPlayerService.java
index 2086795..c71c961 100644
--- a/ximon-admin/src/main/java/com/sandu/ximon/admin/service/XiXunPlayerService.java
+++ b/ximon-admin/src/main/java/com/sandu/ximon/admin/service/XiXunPlayerService.java
@@ -69,6 +69,18 @@
}
public boolean insert(ProgramPro programPro) {
+ programPro.getLayers().forEach(
+ layerPro -> {
+ layerPro.getSources().forEach(
+ sourcePro -> {
+ long fileId = Long.parseLong(sourcePro.getId());
+ LedSFile file = xiXunFileService.getById(fileId);
+ sourcePro.setUrl(file.getFileUrl());
+ sourcePro.setMd5(file.getMd5());
+ }
+ );
+ }
+ );
String json = JsonUtil.jsonObj2Sting(programPro);
PoleXixunPlayerEntity poleXixunPlayer = new PoleXixunPlayerEntity();
poleXixunPlayer.setProgramCode(programPro.get_id());
@@ -148,36 +160,6 @@
}
-// public Object getProgram(String json) {
-//// PoleXixunPlayerEntity byId = getById(pid);
-// List<Long> fileIds = new ArrayList<>();
-// List<LedSFile> file = new ArrayList<>();
-// if (json == null) {
-// throw new BusinessException("鏈壘鍒拌鑺傜洰");
-// }
-// ProgramPro programPro = new ProgramPro();
-// try {
-// programPro = JsonUtil.convertJsonStringToObject(json, ProgramPro.class);
-// programPro.setProgramId(pid);
-// programPro.setScreenShot(byId.getScreenShot());
-// programPro.getLayers().forEach(
-// layerPro -> {
-// layerPro.getSources().forEach(
-// sourcePro -> {
-// long fileId = Long.parseLong(sourcePro.getId());
-// file.add(xiXunFileService.getById(fileId));
-// }
-// );
-// }
-// );
-// programPro.setFileList(file);
-// } catch (Exception e) {
-// e.printStackTrace();
-// }
-// return programPro;
-// }
-
-
/**
* 鎺ㄩ�佽妭鐩�
*
@@ -214,10 +196,10 @@
list2.add(items);
taskPro.setItems(list2);
command.setId(UUID.randomUUID().toString());
- //杩欓噷鏄笅鏂圭殑post鍥炶皟鍦板潃锛岄渶瑕佷慨鏀笽P鍦板潃
- command.setNotificationURL("http://" + config.getIp() + ":" + config.getPort() + "/machine-fast/serv/download/getJSON");
+// //杩欓噷鏄笅鏂圭殑post鍥炶皟鍦板潃锛岄渶瑕佷慨鏀笽P鍦板潃
+ command.setNotificationURL("");
//璧勬簮涓嬭浇閾炬帴鐨勮姹傚ご
- command.setPreDownloadURL("http://" + config.getIp() + ":" + config.getPort() + "/machine-fast/serv/download/downliadFileById/");
+ command.setPreDownloadURL("");
command.setTask(taskPro);
xixun.set_id(UUID.randomUUID().toString());
xixun.setCommand(command);
@@ -314,7 +296,7 @@
/**
* 鐔欐睕澶ф皵鏁版嵁鎺ㄩ�佹棩蹇楄褰曞紑濮�
-// */
+ // */
// String content = "{璁惧code锛�" + lightemitControlCode
// + "锛� 鎺ㄩ�佸唴瀹癸細" + body
// + " }";
--
Gitblit v1.9.3