Skip to content

Commit

Permalink
Merge pull request #76 from fcfang123/issue-75
Browse files Browse the repository at this point in the history
Issue 75
  • Loading branch information
mingshewhe authored Oct 9, 2023
2 parents 0faee38 + a270532 commit f4d547f
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ext {
set("junitVersion", "5.4.2")

if (System.getProperty("snapshot") == "true") {
set('iamVersion', "1.0.38-SNAPSHOT")
set('iamVersion', "1.0.39-SNAPSHOT")
} else {
set('iamVersion', "1.0.0")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ public GradeManagerApplicationResponse updateGradeManagerApplication(String grad
*/
public List<GroupPermissionDetailResponseDTO> getGroupPermissionDetail(Integer groupId);

/**
* 查询用户组权限详情,需传递systemId
*/
public List<GroupPermissionDetailResponseDTO> getGroupPermissionDetail(Integer groupId, String systemId);

/**
* 校验用户是否某个用户组的有效成员
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,13 @@ public List<GroupAction> getRoleGroupActionV2(Integer groupId) {

@Override
public List<GroupPermissionDetailResponseDTO> getGroupPermissionDetail(Integer groupId) {
return getGroupPermissionDetail(groupId, iamConfiguration.getSystemId());
}

@Override
public List<GroupPermissionDetailResponseDTO> getGroupPermissionDetail(Integer groupId, String systemId) {
AuthRequestContext.setRequestName("V2_MANAGER_ROLE_GROUP_PERMISSION_DETAIL_GET");
String url = String.format(V2IamUri.V2_MANAGER_ROLE_GROUP_PERMISSION_DETAIL_GET, iamConfiguration.getSystemId(), groupId);
String url = String.format(V2IamUri.V2_MANAGER_ROLE_GROUP_PERMISSION_DETAIL_GET, systemId, groupId);
try {
String responseStr = apigwHttpClientService.doHttpGet(url);
if (StringUtils.isNotBlank(responseStr)) {
Expand Down Expand Up @@ -356,9 +361,9 @@ public Map<Integer, GroupMemberVerifyInfo> verifyGroupValidMember(String userId,
if (StringUtils.isNotBlank(responseStr)) {
log.debug("verify group valid member response|{}", responseStr);
ResponseDTO<Map<Integer, GroupMemberVerifyInfo>> responseInfo =
JsonUtil.fromJson(responseStr,
new TypeReference<ResponseDTO<Map<Integer, GroupMemberVerifyInfo>>>() {
});
JsonUtil.fromJson(responseStr,
new TypeReference<ResponseDTO<Map<Integer, GroupMemberVerifyInfo>>>() {
});
if (responseInfo != null) {
ResponseUtil.checkResponse(responseInfo);
return responseInfo.getData();
Expand All @@ -385,9 +390,9 @@ public Map<Integer, GroupMemberVerifyInfo> verifyGroupValidDepartment(String dep
if (StringUtils.isNotBlank(responseStr)) {
log.debug("verify group valid department response|{}", responseStr);
ResponseDTO<Map<Integer, GroupMemberVerifyInfo>> responseInfo =
JsonUtil.fromJson(responseStr,
new TypeReference<ResponseDTO<Map<Integer, GroupMemberVerifyInfo>>>() {
});
JsonUtil.fromJson(responseStr,
new TypeReference<ResponseDTO<Map<Integer, GroupMemberVerifyInfo>>>() {
});
if (responseInfo != null) {
ResponseUtil.checkResponse(responseInfo);
return responseInfo.getData();
Expand Down Expand Up @@ -767,12 +772,12 @@ public ManagerDetailResponse getSubsetManagerDetail(String subsetManagerId) {
try {
AuthRequestContext.setRequestName("V2_SUBSET_GRADE_MANAGER_DETAIL_GET");
String responseStr = apigwHttpClientService.doHttpGet(
String.format(V2IamUri.V2_SUBSET_GRADE_MANAGER_DETAIL_GET, iamConfiguration.getSystemId(), subsetManagerId));
String.format(V2IamUri.V2_SUBSET_GRADE_MANAGER_DETAIL_GET, iamConfiguration.getSystemId(), subsetManagerId));
if (StringUtils.isNotBlank(responseStr)) {
log.debug("get subeset manager detail response|{}", responseStr);
ResponseDTO<ManagerDetailResponse> responseInfo =
JsonUtil.fromJson(responseStr, new TypeReference<ResponseDTO<ManagerDetailResponse>>() {
});
JsonUtil.fromJson(responseStr, new TypeReference<ResponseDTO<ManagerDetailResponse>>() {
});
if (responseInfo != null) {
ResponseUtil.checkResponse(responseInfo);
return responseInfo.getData();
Expand Down

0 comments on commit f4d547f

Please sign in to comment.