lyhzzz 3 ay önce
ebeveyn
işleme
5891bd79e1

+ 3 - 0
src/main/java/com/fdkankan/fusion/FusionApplication.java

@@ -20,6 +20,8 @@ public class FusionApplication  implements CommandLineRunner {
 
     @Value("${upload.type}")
     private String uploadType;
+    @Value("${upload.query-path}")
+    private String queryPath;
     public static void main(String[] args) {
         SpringApplication.run(FusionApplication.class, args);
     }
@@ -27,6 +29,7 @@ public class FusionApplication  implements CommandLineRunner {
     @Override
     public void run(String... args) throws Exception {
         CacheUtil.uploadType = uploadType;
+        CacheUtil.queryPath = queryPath;
 
     }
 }

+ 2 - 0
src/main/java/com/fdkankan/fusion/config/CacheUtil.java

@@ -2,6 +2,8 @@ package com.fdkankan.fusion.config;
 
 public class CacheUtil {
     public static String uploadType;
+    public static String queryPath;
     public static String basePath ="/mnt/";
 
+
 }

+ 5 - 5
src/main/java/com/fdkankan/fusion/response/SceneVo.java

@@ -2,6 +2,7 @@ package com.fdkankan.fusion.response;
 
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.fdkankan.fusion.common.FilePath;
+import com.fdkankan.fusion.config.CacheUtil;
 import com.fdkankan.fusion.entity.Model;
 import lombok.Data;
 import org.apache.commons.lang3.StringUtils;
@@ -54,8 +55,7 @@ public class SceneVo extends Model {
      */
     private String rtkLocation;
 
-    @Value("${upload.query-path}")
-    private String queryPath;
+
 
     private String cutModelPath;
     private String surveillancePath;
@@ -64,21 +64,21 @@ public class SceneVo extends Model {
 
     public String getCutModelPath() {
         if(StringUtils.isNotBlank(num) ){
-            return queryPath+String.format(FilePath.OBJ_OSS_PATH,num)+"/user/cutModel.json";
+            return CacheUtil.queryPath+String.format(FilePath.OBJ_OSS_PATH,num)+"/user/cutModel.json";
         }
         return cutModelPath;
     }
 
     public String getSurveillancePath() {
         if(StringUtils.isNotBlank(num)){
-            return queryPath+String.format(FilePath.OBJ_OSS_PATH,num)+"/user/surveillance.json";
+            return CacheUtil.queryPath+String.format(FilePath.OBJ_OSS_PATH,num)+"/user/surveillance.json";
         }
         return surveillancePath;
     }
 
     public String getSceneJsonPath() {
         if(StringUtils.isNotBlank(num)){
-            return queryPath+String.format(FilePath.OBJ_OSS_PATH,num)+"/data/scene.json";
+            return CacheUtil.queryPath+String.format(FilePath.OBJ_OSS_PATH,num)+"/data/scene.json";
         }
         return sceneJsonPath;
     }