Skip to content

Commit

Permalink
Merge pull request #102 from TencentBlueKing/issue-100
Browse files Browse the repository at this point in the history
feat:新增用户管理相关接口 #100
  • Loading branch information
fcfang123 authored Jul 1, 2024
2 parents 05251b0 + b76485d commit 5df7d0a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/**
* 加入时间戳(秒级)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public GradeManagerApplicationResponse updateGradeManagerApplication(String grad
/**
* 批量查询用户/组织/人员模板加入的用户组详情
*/
public MemberGroupDetailsResponse listMemberGroupsDetails(String gradeManagerId, ManagerScopesEnum memberType, String memberId, String groupIds);
public List<MemberGroupDetailsResponse> listMemberGroupsDetails(ManagerScopesEnum memberType, String memberId, String groupIds);

/**
* 查询用户组有权限的Action列表
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,26 +318,20 @@ public void renewalRoleGroupMemberApplication(GroupMemberRenewApplicationDTO gro
}

@Override
public MemberGroupDetailsResponse listMemberGroupsDetails(
String gradeManagerId,
ManagerScopesEnum memberType,
String memberId,
String groupIds
) {
public List<MemberGroupDetailsResponse> 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
);
String responseStr = apigwHttpClientService.doHttpGet(url);
if (StringUtils.isNotBlank(responseStr)) {
log.debug("list member groups details response|{}", responseStr);
ResponseDTO<MemberGroupDetailsResponse> responseInfo =
JsonUtil.fromJson(responseStr, new TypeReference<ResponseDTO<MemberGroupDetailsResponse>>() {
ResponseDTO<List<MemberGroupDetailsResponse>> responseInfo =
JsonUtil.fromJson(responseStr, new TypeReference<ResponseDTO<List<MemberGroupDetailsResponse>>>() {
});
if (responseInfo != null) {
ResponseUtil.checkResponse(responseInfo);
Expand Down

0 comments on commit 5df7d0a

Please sign in to comment.