diff --git a/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/service/metadata/impl/MetadataServiceImpl.kt b/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/service/metadata/impl/MetadataServiceImpl.kt index 2b353a0b46..5f1b886ff2 100644 --- a/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/service/metadata/impl/MetadataServiceImpl.kt +++ b/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/service/metadata/impl/MetadataServiceImpl.kt @@ -67,10 +67,11 @@ import java.time.LocalDateTime @Service @Conditional(DefaultCondition::class) class MetadataServiceImpl( - private val nodeDao: NodeDao, private val nodeBaseService: NodeBaseService ) : MetadataService { + private val nodeDao: NodeDao = nodeBaseService.nodeDao + override fun listMetadata(projectId: String, repoName: String, fullPath: String): Map { return MetadataUtils.toMap(nodeDao.findOne(NodeQueryHelper.nodeQuery(projectId, repoName, fullPath))?.metadata) } diff --git a/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/service/metadata/impl/center/CommitEdgeCenterMetadataServiceImpl.kt b/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/service/metadata/impl/center/CommitEdgeCenterMetadataServiceImpl.kt index dceb08a9d7..42b54102d2 100644 --- a/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/service/metadata/impl/center/CommitEdgeCenterMetadataServiceImpl.kt +++ b/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/service/metadata/impl/center/CommitEdgeCenterMetadataServiceImpl.kt @@ -28,7 +28,6 @@ package com.tencent.bkrepo.repository.service.metadata.impl.center import com.tencent.bkrepo.common.service.cluster.CommitEdgeCenterCondition -import com.tencent.bkrepo.repository.dao.NodeDao import com.tencent.bkrepo.repository.service.metadata.impl.MetadataServiceImpl import com.tencent.bkrepo.repository.service.node.impl.NodeBaseService import org.springframework.context.annotation.Conditional @@ -37,9 +36,7 @@ import org.springframework.stereotype.Service @Service @Conditional(CommitEdgeCenterCondition::class) class CommitEdgeCenterMetadataServiceImpl( - nodeDao: NodeDao, nodeBaseService: NodeBaseService ) : MetadataServiceImpl( - nodeDao, nodeBaseService ) diff --git a/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/service/metadata/impl/edge/EdgeMetadataServiceImpl.kt b/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/service/metadata/impl/edge/EdgeMetadataServiceImpl.kt index b4430804b4..1f1774d652 100644 --- a/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/service/metadata/impl/edge/EdgeMetadataServiceImpl.kt +++ b/src/backend/repository/biz-repository/src/main/kotlin/com/tencent/bkrepo/repository/service/metadata/impl/edge/EdgeMetadataServiceImpl.kt @@ -31,7 +31,6 @@ import com.tencent.bkrepo.common.service.cluster.ClusterProperties import com.tencent.bkrepo.common.service.cluster.CommitEdgeEdgeCondition import com.tencent.bkrepo.common.service.feign.FeignClientFactory import com.tencent.bkrepo.repository.api.cluster.ClusterMetadataClient -import com.tencent.bkrepo.repository.dao.NodeDao import com.tencent.bkrepo.repository.pojo.metadata.MetadataDeleteRequest import com.tencent.bkrepo.repository.pojo.metadata.MetadataSaveRequest import com.tencent.bkrepo.repository.service.metadata.impl.MetadataServiceImpl @@ -42,11 +41,9 @@ import org.springframework.stereotype.Service @Service @Conditional(CommitEdgeEdgeCondition::class) class EdgeMetadataServiceImpl( - nodeDao: NodeDao, nodeBaseService: NodeBaseService, clusterProperties: ClusterProperties ) : MetadataServiceImpl( - nodeDao, nodeBaseService ) {