From 6bbbd1ea0d5ce81eec754e92164c864c53ca438a Mon Sep 17 00:00:00 2001 From: greysonfang Date: Thu, 5 Dec 2024 19:37:35 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E7=94=A8=E6=88=B7=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E8=A7=86=E8=A7=92=20=E6=9D=83=E9=99=90=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=BC=98=E5=8C=96=20#11138?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/tencent/devops/auth/pojo/vo/HandoverOverviewVo.kt | 3 +++ .../com/tencent/devops/auth/dao/AuthHandoverOverviewDao.kt | 1 + .../rbac/service/RbacPermissionHandoverApplicationService.kt | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/pojo/vo/HandoverOverviewVo.kt b/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/pojo/vo/HandoverOverviewVo.kt index 9c44a521394..3b6db85e482 100644 --- a/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/pojo/vo/HandoverOverviewVo.kt +++ b/src/backend/ci/core/auth/api-auth/src/main/kotlin/com/tencent/devops/auth/pojo/vo/HandoverOverviewVo.kt @@ -2,6 +2,7 @@ package com.tencent.devops.auth.pojo.vo import com.tencent.devops.auth.pojo.enum.HandoverStatus import io.swagger.v3.oas.annotations.media.Schema +import java.time.LocalDateTime @Schema(title = "权限交接总览返回体") data class HandoverOverviewVo( @@ -23,6 +24,8 @@ data class HandoverOverviewVo( val groupCount: Int, @get:Schema(title = "授权个数") val authorizationCount: Int, + @get:Schema(title = "创建时间") + val createTime: LocalDateTime, @get:Schema(title = "最后修改人") val lastOperator: String? = null, @get:Schema(title = "是否可以撤销,提单为当前用户并且单据处于审批中") diff --git a/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/dao/AuthHandoverOverviewDao.kt b/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/dao/AuthHandoverOverviewDao.kt index 2993346fded..7bd38d1e60b 100644 --- a/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/dao/AuthHandoverOverviewDao.kt +++ b/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/dao/AuthHandoverOverviewDao.kt @@ -135,6 +135,7 @@ class AuthHandoverOverviewDao { groupCount = groupCount, authorizationCount = authorizationCount, lastOperator = lastOperator, + createTime = createTime, canRevoke = memberId?.let { memberId == applicant && status == HandoverStatus.PENDING.value }, canApproval = memberId?.let { memberId == approver && status == HandoverStatus.PENDING.value }, remark = remark diff --git a/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/provider/rbac/service/RbacPermissionHandoverApplicationService.kt b/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/provider/rbac/service/RbacPermissionHandoverApplicationService.kt index f2d7d8a5c5f..60a46e4dad0 100644 --- a/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/provider/rbac/service/RbacPermissionHandoverApplicationService.kt +++ b/src/backend/ci/core/auth/biz-auth/src/main/kotlin/com/tencent/devops/auth/provider/rbac/service/RbacPermissionHandoverApplicationService.kt @@ -118,6 +118,7 @@ class RbacPermissionHandoverApplicationService( override fun listHandoverOverviews( queryRequest: HandoverOverviewQueryReq ): SQLPage { + logger.info("list handover overviews :$queryRequest") val records = handoverOverviewDao.list( dslContext = dslContext, queryRequest = queryRequest @@ -135,6 +136,7 @@ class RbacPermissionHandoverApplicationService( override fun listAuthorizationsOfHandoverApplication( queryReq: HandoverDetailsQueryReq ): SQLPage { + logger.info("list authorizations of handover application :$queryReq") val flowNo = queryReq.flowNo!! val overview = getHandoverOverview(flowNo) val resourceCodes = handoverDetailDao.list( @@ -174,6 +176,7 @@ class RbacPermissionHandoverApplicationService( override fun listGroupsOfHandoverApplication( queryReq: HandoverDetailsQueryReq ): SQLPage { + logger.info("list groups of handover application :$queryReq") val flowNo = queryReq.flowNo!! val handoverOverview = getHandoverOverview(flowNo) val iamGroupIdsByHandover = listHandoverDetails( @@ -212,6 +215,7 @@ class RbacPermissionHandoverApplicationService( } override fun getResourceType2CountOfHandoverApplication(flowNo: String): List { + logger.info("get resource type count of handover application:$flowNo") val handoverOverview = getHandoverOverview(flowNo) val resourceType2CountWithGroup = handoverDetailDao.countWithResourceType( dslContext = dslContext, @@ -266,6 +270,7 @@ class RbacPermissionHandoverApplicationService( handoverType: HandoverType, resourceType: String? ): List { + logger.info("list member handover details:$projectCode|$memberId|$handoverType|$resourceType") val handoverOverviews = listHandoverOverviews( queryRequest = HandoverOverviewQueryReq( memberId = memberId,