lyhzzz 2 năm trước cách đây
mục cha
commit
582e54efd5

+ 6 - 3
src/main/java/com/fdkankan/fusion/common/FilePath.java

@@ -2,6 +2,9 @@ package com.fdkankan.fusion.common;
 
 public class FilePath {
 
+    public final static String LOCAL_BASE_PATH = "/home/tomcat/jar-fusion-8808/";
+    public final static String MNT_BASE_PATH = "/mnt/";
+    public final static String OSS_BASE_PATH = "fusion/";
 
     public final static String OBJ_OSS_PATH = "scene_view_data/%s/data/mesh";
     public final static String GLB_OSS_PATH = "fusion/%s/model/glb/%s/mesh.glb";
@@ -11,9 +14,9 @@ public class FilePath {
     public final static String DEFAULT_OSS_PATH = "fusion/default/%s";
 
    // public final static String VIDEO_LOCAL_PATH = "D:\\video\\merge";
-   public final static String VIDEO_LOCAL_PATH = "/home/fusion/%s/video/merge";
-   public final static String OBJ_LOCAL_PATH = "/home/fusion/%s/model/%s";
-   public final static String GLB_LOCAL_PATH = "/home/fusion/%s/model/%s";
+   public final static String VIDEO_LOCAL_PATH = LOCAL_BASE_PATH + "%s/video/merge";
+   public final static String OBJ_LOCAL_PATH = LOCAL_BASE_PATH + "%s/model/%s";
+   public final static String GLB_LOCAL_PATH = LOCAL_BASE_PATH + "%s/model/%s";
 
 
 }

+ 4 - 4
src/main/java/com/fdkankan/fusion/common/util/OBJToGLBUtil.java

@@ -2,6 +2,7 @@ package com.fdkankan.fusion.common.util;
 
 import cn.hutool.core.io.FileUtil;
 import com.alibaba.fastjson.JSONObject;
+import com.fdkankan.fusion.common.FilePath;
 import com.fdkankan.fusion.common.ResultCode;
 import com.fdkankan.fusion.exception.BusinessException;
 import lombok.extern.slf4j.Slf4j;
@@ -107,13 +108,13 @@ public class OBJToGLBUtil {
     }
 
     public static File lasOrPlyToBin(File srcFile) throws IOException {
-        String mntPath = srcFile.getPath().replace("home","mnt");
-        String mntPathEmt = srcFile.getParent().replace("home","mnt")+"/res";
+        String mntPath = srcFile.getPath().replace(FilePath.LOCAL_BASE_PATH,FilePath.MNT_BASE_PATH);
+        String mntPathEmt = srcFile.getParent().replace(FilePath.LOCAL_BASE_PATH,FilePath.MNT_BASE_PATH)+"/res";
         File file = new File(mntPathEmt);
         if(!file.exists()){
             file.mkdirs();
         }
-        FileUtil.copy(srcFile.getPath(),srcFile.getPath().replace("home","mnt"),true);
+        FileUtil.copy(srcFile.getPath(),mntPath,true);
         String cmd = ShellUtil.LAS_TO_BIN;
         cmd =  cmd.replace("@inPath",mntPath);
         cmd = cmd.replace("@outPath",mntPathEmt);
@@ -124,5 +125,4 @@ public class OBJToGLBUtil {
         FileWriterUtil.writerJson(mntPathEmt +"/webcloud/","cloud.js",jsonObject.toJSONString());
         return file;
     }
-
 }

+ 22 - 0
src/main/resources/application-dev.yaml

@@ -27,3 +27,25 @@ spring:
         max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
     lettuce:
       shutdown-timeout: 0ms
+
+4dkk:
+  laserService:
+    #深时(激光)地址 生产环境:https://laser.4dkankan.com/
+    basePath: http://uat-laser.4dkankan.com
+    port: 80
+    #basePath: http://192.168.0.152:8080
+    #port: 8080
+  fdService:
+    #官网生产环境:https://www.4dkankan.com      http://test.4dkankan.com
+    basePath: http://test.4dkankan.com
+    port: 80
+    #basePath: http://192.168.0.38/4dkankan_v2
+    #port: 8080
+  newFdService:
+    #官网生产环境:https://www.4dkankan.com
+    basePath: http://v4-test.4dkankan.com
+    port: 80
+  overallService:
+    #全景看看生产环境 host: https://www.4dkankan.com/qjkankan
+    basePath: http://test.4dkankan.com/qjkankan
+    port: 80

+ 21 - 0
src/main/resources/application-local.yaml

@@ -28,3 +28,24 @@ spring:
     lettuce:
       shutdown-timeout: 0ms
 
+4dkk:
+  laserService:
+    #深时(激光)地址 生产环境:https://laser.4dkankan.com/
+    basePath: http://uat-laser.4dkankan.com
+    port: 80
+    #basePath: http://192.168.0.152:8080
+    #port: 8080
+  fdService:
+    #官网生产环境:https://www.4dkankan.com      http://test.4dkankan.com
+    basePath: http://test.4dkankan.com
+    port: 80
+    #basePath: http://192.168.0.38/4dkankan_v2
+    #port: 8080
+  newFdService:
+    #官网生产环境:https://www.4dkankan.com
+    basePath: http://v4-test.4dkankan.com
+    port: 80
+  overallService:
+    #全景看看生产环境 host: https://www.4dkankan.com/qjkankan
+    basePath: http://test.4dkankan.com/qjkankan
+    port: 80

+ 21 - 0
src/main/resources/application-prod.yaml

@@ -29,3 +29,24 @@ spring:
       shutdown-timeout: 0ms
 
 
+4dkk:
+  laserService:
+    #深时(激光)地址 生产环境:https://laser.4dkankan.com/
+    basePath: http://laser.4dkankan.com
+    port: 80
+    #basePath: http://192.168.0.152:8080
+    #port: 8080
+  fdService:
+    #官网生产环境:https://www.4dkankan.com      http://test.4dkankan.com
+    basePath: http://www.4dkankan.com
+    port: 80
+    #basePath: http://192.168.0.38/4dkankan_v2
+    #port: 8080
+  newFdService:
+    #官网生产环境:https://www.4dkankan.com
+    basePath: http://www.4dkankan.com
+    port: 80
+  overallService:
+    #全景看看生产环境 host: https://www.4dkankan.com/qjkankan
+    basePath: http://test.4dkankan.com/qjkankan
+    port: 80

+ 21 - 3
src/main/resources/application-test.yaml

@@ -28,6 +28,24 @@ spring:
     lettuce:
       shutdown-timeout: 0ms
 
-local:
-  obj_path: /home/fusion/model/%s
-  glb_path: /home/fusion/model/%s
+4dkk:
+  laserService:
+    #深时(激光)地址 生产环境:https://laser.4dkankan.com/
+    basePath: http://uat-laser.4dkankan.com
+    port: 80
+    #basePath: http://192.168.0.152:8080
+    #port: 8080
+  fdService:
+    #官网生产环境:https://www.4dkankan.com      http://test.4dkankan.com
+    basePath: http://test.4dkankan.com
+    port: 80
+    #basePath: http://192.168.0.38/4dkankan_v2
+    #port: 8080
+  newFdService:
+    #官网生产环境:https://www.4dkankan.com
+    basePath: http://v4-test.4dkankan.com
+    port: 80
+  overallService:
+    #全景看看生产环境 host: https://www.4dkankan.com/qjkankan
+    basePath: http://test.4dkankan.com/qjkankan
+    port: 80

+ 0 - 22
src/main/resources/application.yaml

@@ -21,28 +21,6 @@ mybatis-plus:
   configuration:
     log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #开启sql日志
 
-4dkk:
-  laserService:
-    #深时(激光)地址 生产环境:https://laser.4dkankan.com/
-    basePath: http://uat-laser.4dkankan.com
-    port: 80
-    #basePath: http://192.168.0.152:8080
-    #port: 8080
-  fdService:
-    #官网生产环境:https://www.4dkankan.com      http://test.4dkankan.com
-    basePath: http://test.4dkankan.com
-    port: 80
-    #basePath: http://192.168.0.38/4dkankan_v2
-    #port: 8080
-  newFdService:
-    #官网生产环境:https://www.4dkankan.com
-    basePath: http://v4-test.4dkankan.com
-    port: 80
-  overallService:
-    #全景看看生产环境 host: https://www.4dkankan.com/qjkankan
-    basePath: http://test.4dkankan.com/qjkankan
-    port: 80
-
 
 
 forest:

+ 1 - 1
src/main/resources/logback-spring.xml

@@ -7,7 +7,7 @@
 
 	<contextName>logback</contextName>
 	<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
-	<property name="log.path" value="/home/logs/fusion" />
+	<property name="log.path" value="/home/tomcat/jar-fusion-8808/logs" />
 
 	<!-- 彩色日志 -->
 	<!-- 彩色日志依赖的渲染类 -->