From 78a057f03ce26f7430dfbbb52a295a52d8317809 Mon Sep 17 00:00:00 2001 From: greysonfang Date: Mon, 1 Jul 2024 20:42:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat=EF=BC=9A=E6=96=B0=E5=A2=9E=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=AE=A1=E7=90=86=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=20#100?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/tencent/bk/sdk/iam/constants/V2IamUri.java | 2 +- .../iam/dto/response/MemberGroupDetailsResponse.java | 11 +++-------- .../bk/sdk/iam/service/v2/V2ManagerService.java | 2 +- .../iam/service/v2/impl/V2ManagerServiceImpl.java | 12 +++--------- 4 files changed, 8 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/tencent/bk/sdk/iam/constants/V2IamUri.java b/src/main/java/com/tencent/bk/sdk/iam/constants/V2IamUri.java index da7d353..45764ff 100644 --- a/src/main/java/com/tencent/bk/sdk/iam/constants/V2IamUri.java +++ b/src/main/java/com/tencent/bk/sdk/iam/constants/V2IamUri.java @@ -40,7 +40,7 @@ public class V2IamUri { public static final String V2_SUBSET_GRADE_MANAGER_GROUP_GET = "/api/v2/open/management/systems/%s/subset_managers/%s/groups/"; public static final String V2_MANAGER_GRADE_GROUP_GET = "/api/v2/open/management/systems/%s/grade_managers/%s/groups/"; public static final String V2_MANAGER_GRADE_TEMPLATE_GET = "/api/v2/open/management/systems/%s/grade_managers/%s/subject_templates/"; - public static final String V2_MEMBER_GROUP_DETAILS_GET = "/api/v2/open/management/systems/%s/grade_managers/%s/group_member_types/%s/members/%s/groups/-/details?group_ids=%s"; + public static final String V2_MEMBER_GROUP_DETAILS_GET = "/api/v2/open/management/systems/%s/group_member_types/%s/members/%s/groups/-/details/?group_ids=%s"; // 创建分级管理员 public static final String V2_MANAGER_ROLE_CREATE = "/api/v2/open/management/systems/%s/grade_managers/"; diff --git a/src/main/java/com/tencent/bk/sdk/iam/dto/response/MemberGroupDetailsResponse.java b/src/main/java/com/tencent/bk/sdk/iam/dto/response/MemberGroupDetailsResponse.java index d48f461..c8885a8 100644 --- a/src/main/java/com/tencent/bk/sdk/iam/dto/response/MemberGroupDetailsResponse.java +++ b/src/main/java/com/tencent/bk/sdk/iam/dto/response/MemberGroupDetailsResponse.java @@ -16,14 +16,9 @@ @Data public class MemberGroupDetailsResponse { - @JsonProperty("group_id") - private Integer groupId; - - @JsonProperty("group_name") - private String groupName; - - @JsonProperty("group_description") - private String groupDescription; + private Integer id; + private String name; + private String description; /** * 加入时间戳(秒级) */ diff --git a/src/main/java/com/tencent/bk/sdk/iam/service/v2/V2ManagerService.java b/src/main/java/com/tencent/bk/sdk/iam/service/v2/V2ManagerService.java index d30aba9..c90ce8f 100644 --- a/src/main/java/com/tencent/bk/sdk/iam/service/v2/V2ManagerService.java +++ b/src/main/java/com/tencent/bk/sdk/iam/service/v2/V2ManagerService.java @@ -206,7 +206,7 @@ public GradeManagerApplicationResponse updateGradeManagerApplication(String grad /** * 批量查询用户/组织/人员模板加入的用户组详情 */ - public MemberGroupDetailsResponse listMemberGroupsDetails(String gradeManagerId, ManagerScopesEnum memberType, String memberId, String groupIds); + public List listMemberGroupsDetails(ManagerScopesEnum memberType, String memberId, String groupIds); /** * 查询用户组有权限的Action列表 diff --git a/src/main/java/com/tencent/bk/sdk/iam/service/v2/impl/V2ManagerServiceImpl.java b/src/main/java/com/tencent/bk/sdk/iam/service/v2/impl/V2ManagerServiceImpl.java index 2e21594..8fd1bf0 100644 --- a/src/main/java/com/tencent/bk/sdk/iam/service/v2/impl/V2ManagerServiceImpl.java +++ b/src/main/java/com/tencent/bk/sdk/iam/service/v2/impl/V2ManagerServiceImpl.java @@ -318,17 +318,11 @@ public void renewalRoleGroupMemberApplication(GroupMemberRenewApplicationDTO gro } @Override - public MemberGroupDetailsResponse listMemberGroupsDetails( - String gradeManagerId, - ManagerScopesEnum memberType, - String memberId, - String groupIds - ) { + public List listMemberGroupsDetails(ManagerScopesEnum memberType, String memberId, String groupIds) { try { AuthRequestContext.setRequestName("V2_MEMBER_GROUPS_DETAILS_LIST"); String url = String.format(V2IamUri.V2_MEMBER_GROUP_DETAILS_GET, iamConfiguration.getSystemId(), - gradeManagerId, ManagerScopesEnum.getType(memberType), memberId, groupIds @@ -336,8 +330,8 @@ public MemberGroupDetailsResponse listMemberGroupsDetails( String responseStr = apigwHttpClientService.doHttpGet(url); if (StringUtils.isNotBlank(responseStr)) { log.debug("list member groups details response|{}", responseStr); - ResponseDTO responseInfo = - JsonUtil.fromJson(responseStr, new TypeReference>() { + ResponseDTO> responseInfo = + JsonUtil.fromJson(responseStr, new TypeReference>>() { }); if (responseInfo != null) { ResponseUtil.checkResponse(responseInfo); From b76485dd9d1a6444a2dd15fc51b3a0007c0d6ef2 Mon Sep 17 00:00:00 2001 From: greysonfang Date: Mon, 1 Jul 2024 20:43:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat=EF=BC=9A=E6=96=B0=E5=A2=9E=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=AE=A1=E7=90=86=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=20#100?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 60cd0cb..b03b5d2 100644 --- a/build.gradle +++ b/build.gradle @@ -32,7 +32,7 @@ ext { set('lombokVersion', '1.18.10') set("junitVersion", "5.4.2") - String iamVersion = (System.getProperty("iamVersion") ?: "1.0.52") + String iamVersion = (System.getProperty("iamVersion") ?: "1.0.53") if (System.getProperty("snapshot") == "true") { set('iamVersion', iamVersion + "-SNAPSHOT") } else {