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);  //上传成功