1.Fix bug </br>
2.New searchOrganization method</br> 3.New searchFriends method</br> 4.New getDepartmentInfo method</br> 5.New setGroupMemberRoleLevel method</br>
This commit is contained in:
@@ -206,6 +206,34 @@ class FriendshipManager {
|
||||
"operationID": Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
/// Search friends
|
||||
/// 查好友
|
||||
/// [keywordList] 搜索关键词,目前仅支持一个关键词搜索,不能为空
|
||||
/// [isSearchUserID] 是否以关键词搜索好友ID(注:不可以同时为false),为空默认false
|
||||
/// [isSearchNickname] 是否以关键词搜索昵称,为空默认false
|
||||
/// [isSearchRemark] 是否以关键词搜索备注名,为空默认false
|
||||
Future<List<FriendInfo>> searchFriends({
|
||||
List<String> keywordList = const [],
|
||||
bool isSearchUserID = false,
|
||||
bool isSearchNickname = false,
|
||||
bool isSearchRemark = false,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel
|
||||
.invokeMethod(
|
||||
'searchFriends',
|
||||
_buildParam({
|
||||
'searchParam': {
|
||||
'keywordList': keywordList,
|
||||
'isSearchUserID': isSearchUserID,
|
||||
'isSearchNickname': isSearchNickname,
|
||||
'isSearchRemark': isSearchRemark,
|
||||
},
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) =>
|
||||
Utils.toList(value, (map) => FriendInfo.fromJson(map)));
|
||||
|
||||
static Map _buildParam(Map param) {
|
||||
param["ManagerName"] = "friendshipManager";
|
||||
return param;
|
||||
|
||||
@@ -437,6 +437,26 @@ class GroupManager {
|
||||
.then(
|
||||
(value) => Utils.toList(value, (map) => GroupInfo.fromJson(map)));
|
||||
|
||||
/// Set group user role
|
||||
/// 设置群成员权限
|
||||
/// [groupID] 群ID
|
||||
/// [userID] 群成员的用户ID
|
||||
/// [roleLevel] 角色等级
|
||||
Future<dynamic> setGroupMemberRoleLevel({
|
||||
required String groupID,
|
||||
required String userID,
|
||||
required int roleLevel,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel.invokeMethod(
|
||||
'setGroupMemberRoleLevel',
|
||||
_buildParam({
|
||||
'groupID': groupID,
|
||||
'userID': userID,
|
||||
'roleLevel': roleLevel,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}));
|
||||
|
||||
static Map _buildParam(Map param) {
|
||||
param["ManagerName"] = "groupManager";
|
||||
return param;
|
||||
|
||||
@@ -92,6 +92,57 @@ class OrganizationManager {
|
||||
.then((value) =>
|
||||
Utils.toObj(value, (v) => DeptMemberAndSubDept.fromJson(v)));
|
||||
|
||||
/// Query department info
|
||||
/// 查询部门信息
|
||||
Future<DeptInfo> getDeptInfo({
|
||||
required String departmentID,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel
|
||||
.invokeMethod(
|
||||
'getDepartmentInfo',
|
||||
_buildParam({
|
||||
'departmentID': departmentID,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) => Utils.toObj(value, (v) => DeptInfo.fromJson(v)));
|
||||
|
||||
/// Search
|
||||
/// 搜索组织人员
|
||||
Future<OrganizationSearchResult> searchOrganization({
|
||||
required String keyWord,
|
||||
bool isSearchUserName = false,
|
||||
bool isSearchEnglishName = false,
|
||||
bool isSearchPosition = false,
|
||||
bool isSearchUserID = false,
|
||||
bool isSearchMobile = false,
|
||||
bool isSearchEmail = false,
|
||||
bool isSearchTelephone = false,
|
||||
int offset = 0,
|
||||
int count = 40,
|
||||
String? operationID,
|
||||
}) =>
|
||||
_channel
|
||||
.invokeMethod(
|
||||
'searchOrganization',
|
||||
_buildParam({
|
||||
'searchParams': {
|
||||
'keyWord': keyWord,
|
||||
'isSearchUserName': isSearchUserName,
|
||||
'isSearchEnglishName': isSearchEnglishName,
|
||||
'isSearchPosition': isSearchPosition,
|
||||
'isSearchUserID': isSearchUserID,
|
||||
'isSearchMobile': isSearchMobile,
|
||||
'isSearchEmail': isSearchEmail,
|
||||
'isSearchTelephone': isSearchTelephone,
|
||||
},
|
||||
'offset': offset,
|
||||
'count': count,
|
||||
'operationID': Utils.checkOperationID(operationID),
|
||||
}))
|
||||
.then((value) =>
|
||||
Utils.toObj(value, (v) => OrganizationSearchResult.fromJson(v)));
|
||||
|
||||
static Map _buildParam(Map param) {
|
||||
param["ManagerName"] = "organizationManager";
|
||||
return param;
|
||||
|
||||
Reference in New Issue
Block a user