lyhzzz 1 anno fa
parent
commit
565d8c2544

+ 8 - 4
src/main/java/com/fdkankan/fusion/service/impl/CaseNumServiceImpl.java

@@ -129,18 +129,22 @@ public class CaseNumServiceImpl extends ServiceImpl<ICaseNumMapper, CaseNumEntit
 
             if(localGlbPaths.size() >0){
                 for (String localGlbPath : localGlbPaths) {
-                    File file = new File(localGlbPath);
-                    if(file!=null){
-                        model.setModelSize(FileWriterUtil.setFileSize(file.length()));
-                    }
                     String ossGlbPath = localGlbPath.replace(FilePath.LOCAL_BASE_PATH,"fusion/");
                     uploadToOssUtil.uploadOss(localGlbPath,ossGlbPath);
                     if(ossGlbPath.contains("lod_")){
                         if(ossGlbPath.contains("lod_0")){
                             ossGlbPaths.add(queryPath  +ossGlbPath);
                         }
+                        File file = new File(localGlbPath);
+                        if(file!=null){
+                            model.setModelSize(FileWriterUtil.setFileSize(file.length()));
+                        }
                         continue;
                     }
+                    File file = new File(localGlbPath);
+                    if(file!=null){
+                        model.setModelSize(FileWriterUtil.setFileSize(file.length()));
+                    }
                     ossGlbPaths.add(queryPath +ossGlbPath);
                 }
                 return JSONArray.toJSONString(ossGlbPaths);