fix:文件目录为空时无法删除文件报错
This commit is contained in:
parent
a301432a87
commit
c7682680ee
@ -42,7 +42,9 @@ public class FileServiceImpl extends ServiceImpl<FileMapper, File> implements Fi
|
||||
List<File> files = this.list(queryWrapper);
|
||||
List<String> keys = new ArrayList<>();
|
||||
files.forEach(item -> keys.add(item.getFileKey()));
|
||||
filePluginFactory.filePlugin().deleteFile(keys);
|
||||
if(!keys.isEmpty()) {
|
||||
filePluginFactory.filePlugin().deleteFile(keys);
|
||||
}
|
||||
this.remove(queryWrapper);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user