|
@@ -39,6 +39,7 @@ import com.fdkankan.scene.vo.SceneDataDownloadVO;
|
|
|
import com.fdkankan.scene.vo.SceneEditControlsVO;
|
|
|
import com.fdkankan.web.response.ResultData;
|
|
|
import java.io.File;
|
|
|
+import java.nio.file.FileSystemException;
|
|
|
import java.util.*;
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -392,7 +393,7 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void deleteByList(List<ScenePlus> plusList,Long userId) {
|
|
|
+ public void deleteByList(List<ScenePlus> plusList,Long userId) throws FileSystemException {
|
|
|
HashMap<Long ,Long >cameraMap = new HashMap<>();
|
|
|
if(CollUtil.isEmpty(plusList)){
|
|
|
return;
|
|
@@ -416,16 +417,16 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
|
|
|
// }
|
|
|
|
|
|
//删除编辑和展示文件
|
|
|
- plusList.stream().forEach(plus->{
|
|
|
+ for (ScenePlus plus : plusList) {
|
|
|
ossUtil.deleteObject(String.format(UploadFilePath.VIEW_PATH, plus.getNum()));
|
|
|
ossUtil.deleteObject(String.format(UploadFilePath.EDIT_PATH, plus.getNum()));
|
|
|
- });
|
|
|
+ }
|
|
|
|
|
|
//删除原始资源文件
|
|
|
- plusMap.keySet().stream().forEach(key -> {
|
|
|
+ for (Long key : plusMap.keySet()) {
|
|
|
ScenePlusExt ext = plusMap.get(key);
|
|
|
ossUtil.deleteObject(ext.getDataSource());
|
|
|
- });
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
}
|