add get user group list and destroy user function

This commit is contained in:
fengyun
2019-11-30 11:46:52 +08:00
parent e72ae59e49
commit f5816e20dd
17 changed files with 593 additions and 5 deletions
@@ -284,6 +284,18 @@ public class Main {
System.exit(-1);
}
IMResult<OutputGroupIds> groupIdsIMResult = GroupAdmin.getUserGroups("user1");
if (groupIdsIMResult != null && groupIdsIMResult.getErrorCode() == ErrorCode.ERROR_CODE_SUCCESS) {
if (groupIdsIMResult.getResult().getGroupIds().contains(groupInfo.getTarget_id())) {
System.out.println("get user groups success");
} else {
System.out.println("get user groups failure");
System.exit(-1);
}
} else {
System.out.println("get user groups failure");
System.exit(-1);
}
//***********************************************
@@ -392,5 +404,14 @@ public class Main {
System.out.println("robot get user info by userId failure");
System.exit(-1);
}
voidIMResult = UserAdmin.destroyUser("user1");
if (voidIMResult != null && voidIMResult.getErrorCode() == ErrorCode.ERROR_CODE_SUCCESS) {
System.out.println("destroy user success");
} else {
System.out.println("destroy user failure");
System.exit(-1);
}
}
}