lyhzzz před 3 měsíci
rodič
revize
c84c90cf89

+ 11 - 2
src/main/java/com/fdkankan/fusion/down/FusionDownService.java

@@ -287,7 +287,7 @@ public class FusionDownService {
 
 
         List<CaseAnimation> listByFusionId = caseAnimationService.getListByFusionId(fusionId);
         List<CaseAnimation> listByFusionId = caseAnimationService.getListByFusionId(fusionId);
         for (CaseAnimation caseAnimation : listByFusionId) {
         for (CaseAnimation caseAnimation : listByFusionId) {
-            downModel(caseAnimation.getUrl(),caseOffPath);
+            downModelObj(caseAnimation.getUrl(),caseOffPath);
         }
         }
         jsonObject.put(basePath+caseAnimationUrl+fusionId, ResultData.ok(listByFusionId));
         jsonObject.put(basePath+caseAnimationUrl+fusionId, ResultData.ok(listByFusionId));
         String jsonString = jsonObject.toJSONString();
         String jsonString = jsonObject.toJSONString();
@@ -385,12 +385,21 @@ public class FusionDownService {
             String res = (String) object;
             String res = (String) object;
             log.info("下载模型:{}",res);
             log.info("下载模型:{}",res);
             res = res.replace(queryPath, "");
             res = res.replace(queryPath, "");
-            if(res.contains(".json") ){
+            if(res.contains(".json") || res.contains(".obj")){
                 res = new File(res).getParentFile().getPath();
                 res = new File(res).getParentFile().getPath();
             }
             }
             ShellUtil.yunDownload(res, path +"/"+ res);
             ShellUtil.yunDownload(res, path +"/"+ res);
         }
         }
     }
     }
+    public void downModelObj( String modelGlbUrl,String path) {
+        log.info("下载模型:{}",modelGlbUrl);
+        modelGlbUrl = modelGlbUrl.replace(queryPath, "");
+        if(modelGlbUrl.contains(".json") || modelGlbUrl.contains(".obj")){
+            modelGlbUrl = new File(modelGlbUrl).getParentFile().getPath();
+        }
+        ShellUtil.yunDownload(modelGlbUrl, path +"/"+ modelGlbUrl);
+
+    }
     public void downResources(String urls,String offPath) {
     public void downResources(String urls,String offPath) {
         JSONArray jsonArray = JSONArray.parseArray(urls);
         JSONArray jsonArray = JSONArray.parseArray(urls);
         for (Object object : jsonArray) {
         for (Object object : jsonArray) {