Skip to content

Commit

Permalink
feat: 节点删除接口返回的数据排除目录 TencentBlueKing#1942
Browse files Browse the repository at this point in the history
* feat: 节点删除接口返回的数据排除目录 TencentBlueKing#1942

* feat: 节点删除接口返回的数据排除目录 TencentBlueKing#1942
  • Loading branch information
zacYL committed Mar 28, 2024
1 parent 1eb163c commit 30c49e9
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,13 @@ open class NodeDeleteSupport(
if (deletedNum == 0L) {
return NodeDeleteResult(deletedNum, deletedSize, deleteTime)
}
deletedSize = nodeBaseService.aggregateComputeSize(criteria.and(TNode::deleted).isEqualTo(deleteTime))
var deletedCriteria = criteria.and(TNode::deleted).isEqualTo(deleteTime)
fullPaths?.let {
// 节点删除接口返回的数据排除目录
deletedCriteria = deletedCriteria.and(TNode::folder).isEqualTo(false)
deletedNum = nodeDao.count(Query(deletedCriteria))
}
deletedSize = nodeBaseService.aggregateComputeSize(deletedCriteria)
quotaService.decreaseUsedVolume(projectId, repoName, deletedSize)
fullPaths?.forEach {
if (routerControllerProperties.enabled) {
Expand Down

0 comments on commit 30c49e9

Please sign in to comment.