fix:空文件夹删除
This commit is contained in:
@@ -628,6 +628,7 @@ public class MinioFileIDataFileServiceImpl implements IDataFileService {
|
||||
public SdmResponse isDirEmpty(Long dirId) {
|
||||
return SdmResponse.success(!fileMetadataInfoService.lambdaQuery()
|
||||
.eq(FileMetadataInfo::getParentId, dirId)
|
||||
.isNull(FileMetadataInfo::getDeletedAt)
|
||||
.exists());
|
||||
}
|
||||
|
||||
@@ -660,6 +661,7 @@ public class MinioFileIDataFileServiceImpl implements IDataFileService {
|
||||
// 2. 空目录快速判定:检查是否存在子项
|
||||
boolean hasChildren = fileMetadataInfoService.lambdaQuery()
|
||||
.eq(FileMetadataInfo::getParentId, rootDirId)
|
||||
.isNull(FileMetadataInfo::getDeletedAt)
|
||||
.exists();
|
||||
|
||||
// 3. 需要审批的目录类型且非空:走审批流程,审批通过后由 DeleteApproveStrategy 执行(可按 immediateDelete 决定是否进回收站)
|
||||
|
||||
Reference in New Issue
Block a user