lyhzzz 3 лет назад
Родитель
Сommit
cee228d4fd

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

@@ -36,6 +36,8 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
     private String OBJ_PATH;
     @Value("${local.glb_path}")
     private String GLB_PATH;
+    @Value("${upload.query-path}")
+    private String queryPath;
 
     @Override
     public List<CaseNumEntity> getByCaseId(Integer caseId) {
@@ -86,7 +88,7 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
 
             OBJToGLBUtil.objToGlb(objPath+"/mesh.obj",glbPath);
             uploadToOssUtil.upload(glbPath,glbOssPath);
-            return glbOssPath;
+            return queryPath + "/"+glbOssPath;
         }
         return null;
     }

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

@@ -53,6 +53,8 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
     private String OBJ_PATH;
     @Value("${local.glb_path}")
     private String GLB_PATH;
+    @Value("${upload.query-path}")
+    private String queryPath;
 
     @Override
     public void uploadObj(MultipartFile file, String username) throws Exception {
@@ -85,7 +87,7 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
             String glbPath = String.format(GLB_PATH , "modelId_"+model.getModelId());
             String glbOssPath = FilePath.GLB_OSS_PATH +"/" + model.getModelId();
             model.setModelObjUrl(objPath);
-            model.setModelGlbUrl(glbPath);
+            model.setModelGlbUrl(queryPath +"/"+glbPath);
 
             File newObjFile = new File(objPath +"/" + fileName);
             if(!newObjFile.getParentFile().exists()){