Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c3311cce1 | ||
|
|
9a359ca9a0 | ||
|
|
cc2211c36d | ||
|
|
ccf4d4fec1 | ||
|
|
0b8762a754 | ||
|
|
28a911022c | ||
|
|
996281e49a | ||
|
|
e2b546f400 | ||
|
|
8abc8e4399 | ||
|
|
ed20b4915a | ||
|
|
8b1f4dc320 | ||
|
|
f7416290fb |
18
CHANGELOG.md
18
CHANGELOG.md
@@ -1,3 +1,21 @@
|
|||||||
|
## 2.0.9+3
|
||||||
|
|
||||||
|
1.Fix bug </br>
|
||||||
|
2.New setGlobalRecvMessageOpt method</br>
|
||||||
|
|
||||||
|
|
||||||
|
## 2.0.9+2
|
||||||
|
|
||||||
|
1.Fix bug </br>
|
||||||
|
2.New searchOrganization method</br>
|
||||||
|
3.New searchFriends method</br>
|
||||||
|
4.New getDepartmentInfo method</br>
|
||||||
|
5.New setGroupMemberRoleLevel method</br>
|
||||||
|
|
||||||
|
## 2.0.9+1
|
||||||
|
|
||||||
|
1.Fix bug </br>
|
||||||
|
|
||||||
## 2.0.9
|
## 2.0.9
|
||||||
|
|
||||||
1.Fix bug </br>
|
1.Fix bug </br>
|
||||||
|
|||||||
@@ -41,5 +41,5 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'io.openim:core-sdk:2.0.9.6@aar'
|
implementation 'io.openim:core-sdk:2.0.9.27@aar'
|
||||||
}
|
}
|
||||||
@@ -154,4 +154,12 @@ public class ConversationManager extends BaseManager {
|
|||||||
public void getAtAllTag(MethodCall methodCall, MethodChannel.Result result) {
|
public void getAtAllTag(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
CommonUtil.runMainThreadReturn(result, Open_im_sdk.getAtAllTag());
|
CommonUtil.runMainThreadReturn(result, Open_im_sdk.getAtAllTag());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setGlobalRecvMessageOpt(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setGlobalRecvMessageOpt(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
int2long(methodCall, "status")
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,4 +112,12 @@ public class FriendshipManager extends BaseManager {
|
|||||||
jsonValue(methodCall)
|
jsonValue(methodCall)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void searchFriends(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.searchFriends(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "searchParam")
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,4 +190,13 @@ public class GroupManager extends BaseManager {
|
|||||||
jsonValue(methodCall, "searchParam")
|
jsonValue(methodCall, "searchParam")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setGroupMemberRoleLevel(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.setGroupMemberRoleLevel(new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "groupID"),
|
||||||
|
value(methodCall, "userID"),
|
||||||
|
int2long(methodCall, "roleLevel")
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -47,4 +47,22 @@ public class OrganizationManager extends BaseManager {
|
|||||||
value(methodCall, "departmentID")
|
value(methodCall, "departmentID")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void getDepartmentInfo(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.getDepartmentInfo(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
value(methodCall, "departmentID")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void searchOrganization(MethodCall methodCall, MethodChannel.Result result) {
|
||||||
|
Open_im_sdk.searchOrganization(
|
||||||
|
new OnBaseListener(result, methodCall),
|
||||||
|
value(methodCall, "operationID"),
|
||||||
|
jsonValue(methodCall, "searchParams"),
|
||||||
|
int2long(methodCall, "offset"),
|
||||||
|
int2long(methodCall, "count")
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ packages:
|
|||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0"
|
version: "1.16.0"
|
||||||
cupertino_icons:
|
cupertino_icons:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -56,7 +56,7 @@ packages:
|
|||||||
name: fake_async
|
name: fake_async
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.3.0"
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -68,7 +68,7 @@ packages:
|
|||||||
path: ".."
|
path: ".."
|
||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "2.0.9"
|
version: "2.0.9+2"
|
||||||
flutter_test:
|
flutter_test:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -87,7 +87,7 @@ packages:
|
|||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.3"
|
version: "0.1.4"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -101,7 +101,7 @@ packages:
|
|||||||
name: path
|
name: path
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0"
|
version: "1.8.1"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -113,7 +113,7 @@ packages:
|
|||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.1"
|
version: "1.8.2"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -148,21 +148,14 @@ packages:
|
|||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.8"
|
version: "0.4.9"
|
||||||
typed_data:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: typed_data
|
|
||||||
url: "https://pub.flutter-io.cn"
|
|
||||||
source: hosted
|
|
||||||
version: "1.3.0"
|
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "2.1.2"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.14.0 <3.0.0"
|
dart: ">=2.17.0-0 <3.0.0"
|
||||||
flutter: ">=1.20.0"
|
flutter: ">=1.20.0"
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ public class ConversationManager: BaseServiceManager {
|
|||||||
self["deleteAllConversationFromLocal"] = deleteAllConversationFromLocal
|
self["deleteAllConversationFromLocal"] = deleteAllConversationFromLocal
|
||||||
self["resetConversationGroupAtType"] = resetConversationGroupAtType
|
self["resetConversationGroupAtType"] = resetConversationGroupAtType
|
||||||
self["getAtAllTag"] = getAtAllTag
|
self["getAtAllTag"] = getAtAllTag
|
||||||
|
self["setGlobalRecvMessageOpt"] = setGlobalRecvMessageOpt
|
||||||
}
|
}
|
||||||
|
|
||||||
func setConversationListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func setConversationListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
@@ -103,6 +104,10 @@ public class ConversationManager: BaseServiceManager {
|
|||||||
func getAtAllTag(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func getAtAllTag(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
callBack(result, Open_im_sdkGetAtAllTag())
|
callBack(result, Open_im_sdkGetAtAllTag())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func setGlobalRecvMessageOpt(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSetGlobalRecvMessageOpt(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[int: "status"])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ public class FriendshipManager: BaseServiceManager {
|
|||||||
self["deleteFriend"] = deleteFriend
|
self["deleteFriend"] = deleteFriend
|
||||||
self["acceptFriendApplication"] = acceptFriendApplication
|
self["acceptFriendApplication"] = acceptFriendApplication
|
||||||
self["refuseFriendApplication"] = refuseFriendApplication
|
self["refuseFriendApplication"] = refuseFriendApplication
|
||||||
|
self["searchFriends"] = searchFriends
|
||||||
// self["forceSyncFriendApplication"] = forceSyncFriendApplication
|
// self["forceSyncFriendApplication"] = forceSyncFriendApplication
|
||||||
// self["forceSyncFriend"] = forceSyncFriend
|
// self["forceSyncFriend"] = forceSyncFriend
|
||||||
// self["forceSyncBlackList"] = forceSyncBlackList
|
// self["forceSyncBlackList"] = forceSyncBlackList
|
||||||
@@ -81,6 +82,9 @@ public class FriendshipManager: BaseServiceManager {
|
|||||||
Open_im_sdkRefuseFriendApplication(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString())
|
Open_im_sdkRefuseFriendApplication(BaseCallback(result: result), methodCall[string: "operationID"], methodCall.toJsonString())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func searchFriends(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSearchFriends(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "searchParam"])
|
||||||
|
}
|
||||||
// func forceSyncFriendApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
// func forceSyncFriendApplication(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
// Open_im_sdkForceSyncFriendApplication()
|
// Open_im_sdkForceSyncFriendApplication()
|
||||||
// callBack(result)
|
// callBack(result)
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ public class GroupManager: BaseServiceManager {
|
|||||||
self["changeGroupMemberMute"] = changeGroupMemberMute
|
self["changeGroupMemberMute"] = changeGroupMemberMute
|
||||||
self["setGroupMemberNickname"] = setGroupMemberNickname
|
self["setGroupMemberNickname"] = setGroupMemberNickname
|
||||||
self["searchGroups"] = searchGroups
|
self["searchGroups"] = searchGroups
|
||||||
|
self["setGroupMemberRoleLevel"] = setGroupMemberRoleLevel
|
||||||
}
|
}
|
||||||
|
|
||||||
func setGroupListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func setGroupListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
@@ -115,6 +116,10 @@ public class GroupManager: BaseServiceManager {
|
|||||||
func searchGroups(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func searchGroups(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
Open_im_sdkSearchGroups(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "searchParam"])
|
Open_im_sdkSearchGroups(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "searchParam"])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func setGroupMemberRoleLevel(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
|
Open_im_sdkSetGroupMemberRoleLevel(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "groupID"], methodCall[string:"userID"],methodCall[int:"roleLevel"])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GroupListener: NSObject, Open_im_sdk_callbackOnGroupListenerProtocol {
|
public class GroupListener: NSObject, Open_im_sdk_callbackOnGroupListenerProtocol {
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ public class OrganizationManager: BaseServiceManager {
|
|||||||
self["getDepartmentMember"] = getDepartmentMember
|
self["getDepartmentMember"] = getDepartmentMember
|
||||||
self["getUserInDepartment"] = getUserInDepartment
|
self["getUserInDepartment"] = getUserInDepartment
|
||||||
self["getDepartmentMemberAndSubDepartment"] = getDepartmentMemberAndSubDepartment
|
self["getDepartmentMemberAndSubDepartment"] = getDepartmentMemberAndSubDepartment
|
||||||
|
self["getDepartmentInfo"] = getDepartmentInfo
|
||||||
|
self["searchOrganization"] = searchOrganization
|
||||||
}
|
}
|
||||||
|
|
||||||
func setOrganizationListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
func setOrganizationListener(methodCall: FlutterMethodCall, result: @escaping FlutterResult){
|
||||||
@@ -32,6 +34,14 @@ public class OrganizationManager: BaseServiceManager {
|
|||||||
func getDepartmentMemberAndSubDepartment(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
func getDepartmentMemberAndSubDepartment(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
Open_im_sdkGetDepartmentMemberAndSubDepartment(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "departmentID"])
|
Open_im_sdkGetDepartmentMemberAndSubDepartment(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "departmentID"])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getDepartmentInfo(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
|
Open_im_sdkGetDepartmentInfo(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[string: "departmentID"])
|
||||||
|
}
|
||||||
|
|
||||||
|
func searchOrganization(methodCall: FlutterMethodCall, result: @escaping FlutterResult) {
|
||||||
|
Open_im_sdkSearchOrganization(BaseCallback(result: result), methodCall[string: "operationID"], methodCall[jsonString: "searchParams"], methodCall[int: "offset"], methodCall[int: "count"])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class OrganizationListener: NSObject, Open_im_sdk_callbackOnOrganizationListenerProtocol {
|
public class OrganizationListener: NSObject, Open_im_sdk_callbackOnOrganizationListenerProtocol {
|
||||||
|
|||||||
@@ -3,4 +3,5 @@ class GroupAtType {
|
|||||||
static const atMe = 1;
|
static const atMe = 1;
|
||||||
static const atAll = 2;
|
static const atAll = 2;
|
||||||
static const atAllAtMe = 3;
|
static const atAllAtMe = 3;
|
||||||
|
static const groupNotification = 4;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -261,6 +261,21 @@ class ConversationManager {
|
|||||||
Future<dynamic> getAtAllTag() =>
|
Future<dynamic> getAtAllTag() =>
|
||||||
_channel.invokeMethod('getAtAllTag', _buildParam({}));
|
_channel.invokeMethod('getAtAllTag', _buildParam({}));
|
||||||
|
|
||||||
|
/// Global Do Not Disturb
|
||||||
|
/// [status] 0: Normal. 1: Do not receive messages. 2: Do not notify when messages are received.
|
||||||
|
/// 全局免打扰
|
||||||
|
/// [status] 0:正常;1:不接受消息;2:接受在线消息不接受离线消息;
|
||||||
|
Future<dynamic> setGlobalRecvMessageOpt({
|
||||||
|
required int status,
|
||||||
|
String? operationID,
|
||||||
|
}) =>
|
||||||
|
_channel.invokeMethod(
|
||||||
|
'setGlobalRecvMessageOpt',
|
||||||
|
_buildParam({
|
||||||
|
"status": status,
|
||||||
|
"operationID": Utils.checkOperationID(operationID),
|
||||||
|
}));
|
||||||
|
|
||||||
/// Custom sort for conversation list
|
/// Custom sort for conversation list
|
||||||
/// 会话列表自定义排序规则。
|
/// 会话列表自定义排序规则。
|
||||||
List<ConversationInfo> simpleSort(List<ConversationInfo> list) => list
|
List<ConversationInfo> simpleSort(List<ConversationInfo> list) => list
|
||||||
|
|||||||
@@ -206,6 +206,34 @@ class FriendshipManager {
|
|||||||
"operationID": Utils.checkOperationID(operationID),
|
"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) {
|
static Map _buildParam(Map param) {
|
||||||
param["ManagerName"] = "friendshipManager";
|
param["ManagerName"] = "friendshipManager";
|
||||||
return param;
|
return param;
|
||||||
|
|||||||
@@ -437,6 +437,26 @@ class GroupManager {
|
|||||||
.then(
|
.then(
|
||||||
(value) => Utils.toList(value, (map) => GroupInfo.fromJson(map)));
|
(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) {
|
static Map _buildParam(Map param) {
|
||||||
param["ManagerName"] = "groupManager";
|
param["ManagerName"] = "groupManager";
|
||||||
return param;
|
return param;
|
||||||
|
|||||||
@@ -92,6 +92,57 @@ class OrganizationManager {
|
|||||||
.then((value) =>
|
.then((value) =>
|
||||||
Utils.toObj(value, (v) => DeptMemberAndSubDept.fromJson(v)));
|
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) {
|
static Map _buildParam(Map param) {
|
||||||
param["ManagerName"] = "organizationManager";
|
param["ManagerName"] = "organizationManager";
|
||||||
return param;
|
return param;
|
||||||
|
|||||||
@@ -84,24 +84,31 @@ class DeptMemberInfo {
|
|||||||
String? ex;
|
String? ex;
|
||||||
String? attachedInfo;
|
String? attachedInfo;
|
||||||
|
|
||||||
DeptMemberInfo(
|
/// 搜索时使用
|
||||||
{this.userID,
|
String? departmentName;
|
||||||
this.nickname,
|
List<DeptInfo>? parentDepartmentList;
|
||||||
this.englishName,
|
|
||||||
this.faceURL,
|
DeptMemberInfo({
|
||||||
this.gender,
|
this.userID,
|
||||||
this.mobile,
|
this.nickname,
|
||||||
this.telephone,
|
this.englishName,
|
||||||
this.birth,
|
this.faceURL,
|
||||||
this.email,
|
this.gender,
|
||||||
this.departmentID,
|
this.mobile,
|
||||||
this.order,
|
this.telephone,
|
||||||
this.position,
|
this.birth,
|
||||||
this.leader,
|
this.email,
|
||||||
this.status,
|
this.departmentID,
|
||||||
this.createTime,
|
this.order,
|
||||||
this.ex,
|
this.position,
|
||||||
this.attachedInfo});
|
this.leader,
|
||||||
|
this.status,
|
||||||
|
this.createTime,
|
||||||
|
this.ex,
|
||||||
|
this.attachedInfo,
|
||||||
|
this.departmentName,
|
||||||
|
this.parentDepartmentList,
|
||||||
|
});
|
||||||
|
|
||||||
DeptMemberInfo.fromJson(Map<String, dynamic> json) {
|
DeptMemberInfo.fromJson(Map<String, dynamic> json) {
|
||||||
userID = json['userID'];
|
userID = json['userID'];
|
||||||
@@ -121,6 +128,13 @@ class DeptMemberInfo {
|
|||||||
createTime = json['createTime'];
|
createTime = json['createTime'];
|
||||||
ex = json['ex'];
|
ex = json['ex'];
|
||||||
attachedInfo = json['attachedInfo'];
|
attachedInfo = json['attachedInfo'];
|
||||||
|
departmentName = json['departmentName'];
|
||||||
|
if (json['parentDepartmentList'] != null) {
|
||||||
|
parentDepartmentList = <DeptInfo>[];
|
||||||
|
json['parentDepartmentList'].forEach((v) {
|
||||||
|
parentDepartmentList!.add(DeptInfo.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@@ -142,6 +156,11 @@ class DeptMemberInfo {
|
|||||||
data['createTime'] = this.createTime;
|
data['createTime'] = this.createTime;
|
||||||
data['ex'] = this.ex;
|
data['ex'] = this.ex;
|
||||||
data['attachedInfo'] = this.attachedInfo;
|
data['attachedInfo'] = this.attachedInfo;
|
||||||
|
data['departmentName'] = this.departmentName;
|
||||||
|
if (this.parentDepartmentList != null) {
|
||||||
|
data['parentDepartmentList'] =
|
||||||
|
this.parentDepartmentList!.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,8 +206,13 @@ class UserInDept {
|
|||||||
class DeptMemberAndSubDept {
|
class DeptMemberAndSubDept {
|
||||||
List<DeptInfo>? departmentList;
|
List<DeptInfo>? departmentList;
|
||||||
List<DeptMemberInfo>? departmentMemberList;
|
List<DeptMemberInfo>? departmentMemberList;
|
||||||
|
List<DeptInfo>? parentDepartmentList;
|
||||||
|
|
||||||
DeptMemberAndSubDept({this.departmentList, this.departmentMemberList});
|
DeptMemberAndSubDept({
|
||||||
|
this.departmentList,
|
||||||
|
this.departmentMemberList,
|
||||||
|
this.parentDepartmentList,
|
||||||
|
});
|
||||||
|
|
||||||
DeptMemberAndSubDept.fromJson(Map<String, dynamic> json) {
|
DeptMemberAndSubDept.fromJson(Map<String, dynamic> json) {
|
||||||
if (json['departmentList'] != null) {
|
if (json['departmentList'] != null) {
|
||||||
@@ -203,6 +227,54 @@ class DeptMemberAndSubDept {
|
|||||||
departmentMemberList!.add(DeptMemberInfo.fromJson(v));
|
departmentMemberList!.add(DeptMemberInfo.fromJson(v));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (json['parentDepartmentList'] != null) {
|
||||||
|
parentDepartmentList = <DeptInfo>[];
|
||||||
|
json['parentDepartmentList'].forEach((v) {
|
||||||
|
parentDepartmentList!.add(DeptInfo.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final data = Map<String, dynamic>();
|
||||||
|
if (this.departmentList != null) {
|
||||||
|
data['departmentList'] =
|
||||||
|
this.departmentList!.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
if (this.departmentMemberList != null) {
|
||||||
|
data['departmentMemberList'] =
|
||||||
|
this.departmentMemberList!.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
if (this.parentDepartmentList != null) {
|
||||||
|
data['parentDepartmentList'] =
|
||||||
|
this.parentDepartmentList!.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class OrganizationSearchResult {
|
||||||
|
List<DeptInfo>? departmentList;
|
||||||
|
List<DeptMemberInfo>? departmentMemberList;
|
||||||
|
|
||||||
|
OrganizationSearchResult({
|
||||||
|
this.departmentList,
|
||||||
|
this.departmentMemberList,
|
||||||
|
});
|
||||||
|
|
||||||
|
OrganizationSearchResult.fromJson(Map<String, dynamic> json) {
|
||||||
|
if (json['departmentList'] != null) {
|
||||||
|
departmentList = <DeptInfo>[];
|
||||||
|
json['departmentList'].forEach((v) {
|
||||||
|
departmentList!.add(DeptInfo.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (json['departmentMemberList'] != null) {
|
||||||
|
departmentMemberList = <DeptMemberInfo>[];
|
||||||
|
json['departmentMemberList'].forEach((v) {
|
||||||
|
departmentMemberList!.add(DeptMemberInfo.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ class InvitationInfo {
|
|||||||
String? groupID; //如果是单聊,为""
|
String? groupID; //如果是单聊,为""
|
||||||
String? roomID; //房间ID,必须唯一,可以不设置。
|
String? roomID; //房间ID,必须唯一,可以不设置。
|
||||||
int? timeout; //邀请超时时间(秒)
|
int? timeout; //邀请超时时间(秒)
|
||||||
|
int? initiateTime;
|
||||||
String? mediaType; //video 或者audio
|
String? mediaType; //video 或者audio
|
||||||
int? sessionType; //1为单聊,2为群聊
|
int? sessionType; //1为单聊,2为群聊
|
||||||
int? platformID; //和之前定义一致
|
int? platformID; //和之前定义一致
|
||||||
@@ -46,6 +47,7 @@ class InvitationInfo {
|
|||||||
this.groupID,
|
this.groupID,
|
||||||
this.roomID,
|
this.roomID,
|
||||||
this.timeout,
|
this.timeout,
|
||||||
|
this.initiateTime,
|
||||||
this.mediaType,
|
this.mediaType,
|
||||||
this.sessionType,
|
this.sessionType,
|
||||||
this.platformID});
|
this.platformID});
|
||||||
@@ -56,6 +58,7 @@ class InvitationInfo {
|
|||||||
groupID = json['groupID'];
|
groupID = json['groupID'];
|
||||||
roomID = json['roomID'];
|
roomID = json['roomID'];
|
||||||
timeout = json['timeout'];
|
timeout = json['timeout'];
|
||||||
|
initiateTime = json['initiateTime'];
|
||||||
mediaType = json['mediaType'];
|
mediaType = json['mediaType'];
|
||||||
sessionType = json['sessionType'];
|
sessionType = json['sessionType'];
|
||||||
platformID = json['platformID'];
|
platformID = json['platformID'];
|
||||||
@@ -68,6 +71,7 @@ class InvitationInfo {
|
|||||||
data['groupID'] = this.groupID;
|
data['groupID'] = this.groupID;
|
||||||
data['roomID'] = this.roomID;
|
data['roomID'] = this.roomID;
|
||||||
data['timeout'] = this.timeout;
|
data['timeout'] = this.timeout;
|
||||||
|
data['initiateTime'] = this.initiateTime;
|
||||||
data['mediaType'] = this.mediaType;
|
data['mediaType'] = this.mediaType;
|
||||||
data['sessionType'] = this.sessionType;
|
data['sessionType'] = this.sessionType;
|
||||||
data['platformID'] = this.platformID;
|
data['platformID'] = this.platformID;
|
||||||
|
|||||||
@@ -29,6 +29,9 @@ class UserInfo {
|
|||||||
|
|
||||||
bool? isBlacklist;
|
bool? isBlacklist;
|
||||||
|
|
||||||
|
/// 全局免打扰
|
||||||
|
int? globalRecvMsgOpt;
|
||||||
|
|
||||||
UserInfo({
|
UserInfo({
|
||||||
this.publicInfo,
|
this.publicInfo,
|
||||||
this.friendInfo,
|
this.friendInfo,
|
||||||
@@ -46,6 +49,7 @@ class UserInfo {
|
|||||||
this.ex,
|
this.ex,
|
||||||
this.createTime,
|
this.createTime,
|
||||||
this.remark,
|
this.remark,
|
||||||
|
this.globalRecvMsgOpt,
|
||||||
});
|
});
|
||||||
|
|
||||||
// UserInfo.self(Map<String, dynamic> json) {
|
// UserInfo.self(Map<String, dynamic> json) {
|
||||||
@@ -84,6 +88,7 @@ class UserInfo {
|
|||||||
remark = json['remark'] ?? _remark;
|
remark = json['remark'] ?? _remark;
|
||||||
ex = json['ex'] ?? _ex;
|
ex = json['ex'] ?? _ex;
|
||||||
createTime = json['createTime'];
|
createTime = json['createTime'];
|
||||||
|
globalRecvMsgOpt = json['globalRecvMsgOpt'];
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@@ -104,6 +109,7 @@ class UserInfo {
|
|||||||
data['ex'] = this.ex;
|
data['ex'] = this.ex;
|
||||||
data['createTime'] = this.createTime;
|
data['createTime'] = this.createTime;
|
||||||
data['remark'] = this.remark;
|
data['remark'] = this.remark;
|
||||||
|
data['globalRecvMsgOpt'] = this.globalRecvMsgOpt;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
23
pubspec.lock
23
pubspec.lock
@@ -42,14 +42,14 @@ packages:
|
|||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0"
|
version: "1.16.0"
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.3.0"
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -73,7 +73,7 @@ packages:
|
|||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.3"
|
version: "0.1.4"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -87,7 +87,7 @@ packages:
|
|||||||
name: path
|
name: path
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0"
|
version: "1.8.1"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -99,7 +99,7 @@ packages:
|
|||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.1"
|
version: "1.8.2"
|
||||||
stack_trace:
|
stack_trace:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -134,21 +134,14 @@ packages:
|
|||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.8"
|
version: "0.4.9"
|
||||||
typed_data:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: typed_data
|
|
||||||
url: "https://pub.flutter-io.cn"
|
|
||||||
source: hosted
|
|
||||||
version: "1.3.0"
|
|
||||||
vector_math:
|
vector_math:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
url: "https://pub.flutter-io.cn"
|
url: "https://pub.flutter-io.cn"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "2.1.2"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.14.0 <3.0.0"
|
dart: ">=2.17.0-0 <3.0.0"
|
||||||
flutter: ">=1.20.0"
|
flutter: ">=1.20.0"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
name: flutter_openim_sdk
|
name: flutter_openim_sdk
|
||||||
description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source.
|
description: An instant messaging plug-in that supports Android and IOS. And the server is also all open source.
|
||||||
version: 2.0.9
|
version: 2.0.9+3
|
||||||
homepage: https://www.rentsoft.cn
|
homepage: https://www.rentsoft.cn
|
||||||
repository: https://github.com/OpenIMSDK/Open-IM-SDK-Flutter
|
repository: https://github.com/OpenIMSDK/Open-IM-SDK-Flutter
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user