浏览代码

优化项目

Memory_LG 1 月之前
父节点
当前提交
47d4e7f96c
共有 1 个文件被更改,包括 15 次插入10 次删除
  1. 15 10
      src/main/java/com/sooka/sponest/mobile/event/service/impl/AppEventServiceImpl.java

+ 15 - 10
src/main/java/com/sooka/sponest/mobile/event/service/impl/AppEventServiceImpl.java

@@ -97,15 +97,18 @@ public class AppEventServiceImpl implements AppEventService {
     public AjaxResult queryEventDetail(String eventCode) {
         try {
             AppEventSalBO appEventSalBO = remoteEventBaseService.getCentereventTEventcatalogueByCode(eventCode).getData();
-            String token = "";// 大华token
-            if (dahuaFile) {
-                token = remoteMonitorService.getToken();
-            }
-            Map<String, String> keyMap = remoteSystemBaseService.remotegetConfigMap(Arrays.asList("downloadUrl", "appUrl", "HIK_1", "HIK_2", "DH_1", "DH_2")).getData();
-            String finalToken = token;
+
+
+            Map<String, String> keyMap = remoteSystemBaseService.remotegetConfigMap(Arrays.asList("downloadUrl", "appUrl", "HIK_1", "HIK_2", "HIK_3","DH_1", "DH_2")).getData();
+
             appEventSalBO.getAttachs().forEach(item -> {
                 String urlPrefix = FilePrefixUtils.getAPPUrlPrefix(item.getBusSource(), keyMap);
                 if ("DH_1".equals(item.getBusSource())) {
+                    String token = "";// 大华token
+                    if (dahuaFile) {
+                        token = remoteMonitorService.getToken();
+                    }
+                    String finalToken = token;
                     item.setAttachPath(DH1 + item.getAttachPath() + "?token=" + finalToken);
                 } else if ("DH_2".equals(item.getBusSource())) {
                     item.setAttachPath(DH2 + item.getAttachPath());
@@ -151,14 +154,16 @@ public class AppEventServiceImpl implements AppEventService {
         CentereventTFireLog log = remoteEventBaseService.selectCentereventTFireLogById(id).getData();
         log.setWebUrl("");
         List<AppDataTAttach> appDataTAttachList = remoteDataBaseService.attachBFireLogById(id).getData();
-        Map<String, String> keyMap = remoteSystemBaseService.remotegetConfigMap(Arrays.asList("downloadUrl", "appUrl", "HIK_1", "HIK_2", "DH_1", "DH_2")).getData();
+        Map<String, String> keyMap = remoteSystemBaseService.remotegetConfigMap(Arrays.asList("downloadUrl", "appUrl", "HIK_1", "HIK_2", "HIK_3","DH_1", "DH_2")).getData();
         String token = "";// 大华token
-        if (dahuaFile) {
-            token = remoteMonitorService.getToken();
-        }
+
         for (AppDataTAttach appDataTAttach : appDataTAttachList) {
             String urlPrefix = FilePrefixUtils.getAPPUrlPrefix(appDataTAttach.getBusSource(), keyMap);
             if ("DH_1".equals(appDataTAttach.getBusSource())) {
+                if (dahuaFile) {
+                    token = remoteMonitorService.getToken();
+                }
+
                 appDataTAttach.setAttachPath(DH1 + appDataTAttach.getAttachPath() + "?token=" + token);
             } else if ("DH_2".equals(appDataTAttach.getBusSource())) {
                 appDataTAttach.setAttachPath(DH2 + appDataTAttach.getAttachPath());