lyhzzz %!s(int64=3) %!d(string=hai) anos
pai
achega
aa180ab52e

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