lyhzzz 3 년 전
부모
커밋
aa180ab52e
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      src/main/java/com/fdkankan/fusion/service/impl/ModelServiceImpl.java

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

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