lyhzzz 3 rokov pred
rodič
commit
50667d1ab5

+ 2 - 2
src/main/java/com/fdkankan/fusion/service/impl/CaseNumServiceImpl.java

@@ -72,7 +72,7 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
     private String getGlbUrl(Integer type, String num) {
     private String getGlbUrl(Integer type, String num) {
         if(type == 0 || type == 1){ //看看,看见
         if(type == 0 || type == 1){ //看看,看见
             String objPath = String.format(OBJ_PATH ,num);
             String objPath = String.format(OBJ_PATH ,num);
-            String glbPath = String.format(GLB_PATH,num);
+            String glbPath = String.format(GLB_PATH,num) +"/mesh.glb";
             String glbOssPath = String.format(FilePath.GLB_OSS_PATH , num);
             String glbOssPath = String.format(FilePath.GLB_OSS_PATH , num);
             List<String> fileList = uploadToOssUtil.listKeysFromAli(String.format(FilePath.OBJ_OSS_PATH, num));
             List<String> fileList = uploadToOssUtil.listKeysFromAli(String.format(FilePath.OBJ_OSS_PATH, num));
             for (String fileName : fileList) {
             for (String fileName : fileList) {
@@ -84,7 +84,7 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
                 uploadToOssUtil.downFormAli(fileName,objPath +"/"+split[split.length-1]);
                 uploadToOssUtil.downFormAli(fileName,objPath +"/"+split[split.length-1]);
             }
             }
 
 
-            OBJToGLBUtil.objToGlb(objPath,glbPath);
+            OBJToGLBUtil.objToGlb(objPath,glbPath );
             uploadToOssUtil.upload(glbPath,glbOssPath);
             uploadToOssUtil.upload(glbPath,glbOssPath);
             return queryPath + "/"+glbOssPath;
             return queryPath + "/"+glbOssPath;
         }
         }

+ 2 - 2
src/main/java/com/fdkankan/fusion/service/impl/ModelServiceImpl.java

@@ -87,7 +87,7 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
             String glbPath = String.format(GLB_PATH , "modelId_"+model.getModelId());
             String glbPath = String.format(GLB_PATH , "modelId_"+model.getModelId());
             String glbOssPath = String.format(FilePath.GLB_OSS_PATH, model.getModelId());
             String glbOssPath = String.format(FilePath.GLB_OSS_PATH, model.getModelId());
             model.setModelObjUrl(objPath);
             model.setModelObjUrl(objPath);
-            model.setModelGlbUrl(queryPath +"/"+glbPath);
+            model.setModelGlbUrl(queryPath +"/"+glbPath + "/"+modelName +"/mesh.glb");
 
 
             File newObjFile = new File(objPath +"/" + fileName);
             File newObjFile = new File(objPath +"/" + fileName);
             if(!newObjFile.getParentFile().exists()){
             if(!newObjFile.getParentFile().exists()){
@@ -101,7 +101,7 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
                 CreateObjUtil.unRar(newObjFile.getPath(),objPath);
                 CreateObjUtil.unRar(newObjFile.getPath(),objPath);
             }
             }
 
 
-            OBJToGLBUtil.objToGlb(objPath+"/"+modelName,glbPath+"/"+modelName);
+            OBJToGLBUtil.objToGlb(objPath+"/"+modelName,glbPath+"/"+modelName +"/mesh.glb");
             uploadToOssUtil.upload(glbPath,glbOssPath);
             uploadToOssUtil.upload(glbPath,glbOssPath);
 
 
             model.setCreateStatus(1);  //上传成功
             model.setCreateStatus(1);  //上传成功

+ 1 - 1
src/main/resources/application-dev.yaml

@@ -26,4 +26,4 @@ spring:
 
 
 local:
 local:
   obj_path: /home/fusion/model/%s
   obj_path: /home/fusion/model/%s
-  glb_path: /home/fusion/model/%s/mesh.glb
+  glb_path: /home/fusion/model/%s