Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:新增用户管理相关接口 #100 #102

Merged
merged 2 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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