浏览代码

Revert "oss判断目录是否存在改为判断目录中是否有文件"

This reverts commit c3701feb
lyhzzz 2 年之前
父节点
当前提交
458f9cf033
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3 4
      src/main/java/com/fdkankan/ucenter/service/impl/SceneProServiceImpl.java

+ 3 - 4
src/main/java/com/fdkankan/ucenter/service/impl/SceneProServiceImpl.java

@@ -1,6 +1,5 @@
 package com.fdkankan.ucenter.service.impl;
 
-import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.io.FileUtil;
 import cn.hutool.json.JSONUtil;
 import com.alibaba.fastjson.JSONObject;
@@ -1227,9 +1226,9 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         String ossReconstruction = ossResultPath + "caches/reconstruction/";
         if(!fYunFileService.fileExist(ossReconstruction + "final.bin")
                 || !fYunFileService.fileExist(ossReconstruction + "chunk.json")
-                || CollUtil.isEmpty(fYunFileService.listRemoteFiles(ossResultPath + "caches/images"))
-                || CollUtil.isEmpty(fYunFileService.listRemoteFiles(ossResultPath + "caches/depthmap"))
-                || CollUtil.isEmpty(fYunFileService.listRemoteFiles(ossResultPath + "caches/depthmap_csc"))
+                || !fYunFileService.fileExist(ossResultPath + "caches/images")
+                || !fYunFileService.fileExist(ossResultPath + "caches/depthmap")
+                || !fYunFileService.fileExist(ossResultPath + "caches/depthmap_csc")
                 || !fYunFileService.fileExist(ossResultPath + "caches/panorama.json")
                 || !fYunFileService.fileExist(ossResultPath + "results/laserData/laser.ply")){
             throw new BusinessException(SceneConstant.FAILURE_CODE_5038, SceneConstant.FAILURE_MSG_5038);