Explorar o código

三位模型编辑器

dengsixing hai 1 mes
pai
achega
8ff270f283

+ 6 - 0
src/main/java/com/fdkankan/scene/service/impl/NjsSceneBoxModelServiceImpl.java

@@ -270,6 +270,12 @@ public class NjsSceneBoxModelServiceImpl extends ServiceImpl<INjsSceneBoxModelMa
             fYunFileService.deleteFile(njsBoxModelKey);
             return;
         }
+        list.stream().forEach(v->{
+            if(StrUtil.isNotEmpty(v.getGlbKey()) && v.getGlbKey().startsWith(String.format(UploadFilePath.USER_EDIT_PATH, num))){
+                String glbKey = v.getGlbKey().replace(String.format(UploadFilePath.USER_EDIT_PATH, num), String.format(UploadFilePath.USER_VIEW_PATH, num));
+                v.setGlbKey(glbKey);
+            }
+        });
         fYunFileService.uploadFile(JSON.toJSONString(list).getBytes(StandardCharsets.UTF_8), njsBoxModelKey);
     }