数据存储查询

This commit is contained in:
2025-12-12 16:30:36 +08:00
parent 70580652b0
commit d67e56554e
4 changed files with 19 additions and 8 deletions

View File

@@ -62,7 +62,7 @@ public class DataStorageAnalysisController {
return SdmResponse.success(result);
} catch (Exception e) {
log.error("获取文件空间占用失败", e);
return SdmResponse.failed("获取文件空间占用失败");
return SdmResponse.success();
}
}

View File

@@ -69,7 +69,8 @@ public class DataStorageAnalysisImpl implements DataStorageAnalysis {
SdmResponse<List<AllNodeByProjectIdAndTypeResp>> response = simuluationNodeFeignClient.getAllNodeByProjectIdAndType(uuid, queryNodeType);
Long tenantId = ThreadLocalContext.getTenantId();
if (!response.isSuccess()) {
return SdmResponse.failed("获取节点信息失败");
log.error("获取节点信息失败");
return SdmResponse.success();
}
List<AllNodeByProjectIdAndTypeResp> nodeLists = response.getData();
@@ -92,7 +93,8 @@ public class DataStorageAnalysisImpl implements DataStorageAnalysis {
.eq(FileMetadataInfo::getTenantId, tenantId)
.list().stream().collect(Collectors.toMap(FileMetadataInfo::getRelatedResourceUuid, FileMetadataInfo::getId));
if (CollectionUtils.isEmpty(uuidToDirIdMap)) {
return SdmResponse.failed("获取节点信息失败");
log.error("获取节点信息失败");
return SdmResponse.success();
}
// fileMetadIds: uuid对应的fileid结合
@@ -136,8 +138,6 @@ public class DataStorageAnalysisImpl implements DataStorageAnalysis {
});
}
return SdmResponse.success(result);
}