main
hrxiang 3 years ago
parent c7218cb94c
commit 9cd717c67c
  1. 1
      CHANGELOG.md
  2. 2
      android/build.gradle
  3. 6
      android/src/main/java/io/openim/flutter_openim_sdk/manager/OrganizationManager.java
  4. 21
      lib/src/manager/im_organization_manager.dart
  5. 98
      lib/src/models/organization_info.dart

@ -3,6 +3,7 @@
1.Fix bug </br>
2.New organization fuction</br>
3.New uploadImage method </br>
4.Fix login slow bug</br>
## 2.0.8

@ -41,5 +41,5 @@ android {
}
}
dependencies {
implementation 'io.openim:core-sdk:2.0.9.3@aar'
implementation 'io.openim:core-sdk:2.0.9.6@aar'
}

@ -44,11 +44,7 @@ public class OrganizationManager extends BaseManager {
Open_im_sdk.getDepartmentMemberAndSubDepartment(
new OnBaseListener(result, methodCall),
value(methodCall, "operationID"),
value(methodCall, "departmentID"),
int2long(methodCall, "departmentOffset"),
int2long(methodCall, "departmentCount"),
int2long(methodCall, "memberOffset"),
int2long(methodCall, "memberCount")
value(methodCall, "departmentID")
);
}
}

@ -70,12 +70,12 @@ class OrganizationManager {
/// Get the sub-departments and employees under the department
///
Future<List<UserInDept>> getDeptMemberAndSubDept({
Future<DeptMemberAndSubDept> getDeptMemberAndSubDept({
required String departmentID,
int departmentOffset = 0,
int departmentCount = 40,
int memberOffset = 0,
int memberCount = 40,
// int departmentOffset = 0,
// int departmentCount = 40,
// int memberOffset = 0,
// int memberCount = 40,
String? operationID,
}) =>
_channel
@ -83,13 +83,14 @@ class OrganizationManager {
'getDepartmentMemberAndSubDepartment',
_buildParam({
'departmentID': departmentID,
'departmentOffset': departmentOffset,
'departmentCount': departmentCount,
'memberOffset': memberOffset,
'memberCount': memberCount,
// 'departmentOffset': departmentOffset,
// 'departmentCount': departmentCount,
// 'memberOffset': memberOffset,
// 'memberCount': memberCount,
'operationID': Utils.checkOperationID(operationID),
}))
.then((value) => Utils.toList(value, (v) => UserInDept.fromJson(v)));
.then((value) =>
Utils.toObj(value, (v) => DeptMemberAndSubDept.fromJson(v)));
static Map _buildParam(Map param) {
param["ManagerName"] = "organizationManager";

@ -31,11 +31,11 @@ class DeptInfo {
parentID = json['parentID'];
order = json['order'];
departmentType = json['departmentType'];
createTime = json['createTime '];
subDepartmentNum = json['subDepartmentNum '];
memberNum = json['memberNum '];
ex = json['ex '];
attachedInfo = json['attachedInfo '];
createTime = json['createTime'];
subDepartmentNum = json['subDepartmentNum'];
memberNum = json['memberNum'];
ex = json['ex'];
attachedInfo = json['attachedInfo'];
}
Map<String, dynamic> toJson() {
@ -46,13 +46,23 @@ class DeptInfo {
data['parentID'] = this.parentID;
data['order'] = this.order;
data['departmentType'] = this.departmentType;
data['createTime '] = this.createTime;
data['subDepartmentNum '] = this.subDepartmentNum;
data['memberNum '] = this.memberNum;
data['ex '] = this.ex;
data['attachedInfo '] = this.attachedInfo;
data['createTime'] = this.createTime;
data['subDepartmentNum'] = this.subDepartmentNum;
data['memberNum'] = this.memberNum;
data['ex'] = this.ex;
data['attachedInfo'] = this.attachedInfo;
return data;
}
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is DeptInfo &&
runtimeType == other.runtimeType &&
departmentID == other.departmentID;
@override
int get hashCode => departmentID.hashCode;
}
class DeptMemberInfo {
@ -97,20 +107,20 @@ class DeptMemberInfo {
userID = json['userID'];
nickname = json['nickname'];
englishName = json['englishName'];
faceURL = json['faceURL '];
gender = json['gender '];
mobile = json['mobile '];
telephone = json['telephone '];
birth = json['birth '];
email = json['email '];
departmentID = json['departmentID '];
order = json['order '];
position = json['position '];
leader = json['leader '];
status = json['status '];
createTime = json['createTime '];
ex = json['ex '];
attachedInfo = json['attachedInfo '];
faceURL = json['faceURL'];
gender = json['gender'];
mobile = json['mobile'];
telephone = json['telephone'];
birth = json['birth'];
email = json['email'];
departmentID = json['departmentID'];
order = json['order'];
position = json['position'];
leader = json['leader'];
status = json['status'];
createTime = json['createTime'];
ex = json['ex'];
attachedInfo = json['attachedInfo'];
}
Map<String, dynamic> toJson() {
@ -118,24 +128,35 @@ class DeptMemberInfo {
data['userID'] = this.userID;
data['nickname'] = this.nickname;
data['englishName'] = this.englishName;
data['faceURL '] = this.faceURL;
data['gender '] = this.gender;
data['mobile '] = this.mobile;
data['telephone '] = this.telephone;
data['birth '] = this.birth;
data['email '] = this.email;
data['departmentID '] = this.departmentID;
data['order '] = this.order;
data['position '] = this.position;
data['leader '] = this.leader;
data['status '] = this.status;
data['createTime '] = this.createTime;
data['ex '] = this.ex;
data['attachedInfo '] = this.attachedInfo;
data['faceURL'] = this.faceURL;
data['gender'] = this.gender;
data['mobile'] = this.mobile;
data['telephone'] = this.telephone;
data['birth'] = this.birth;
data['email'] = this.email;
data['departmentID'] = this.departmentID;
data['order'] = this.order;
data['position'] = this.position;
data['leader'] = this.leader;
data['status'] = this.status;
data['createTime'] = this.createTime;
data['ex'] = this.ex;
data['attachedInfo'] = this.attachedInfo;
return data;
}
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is DeptMemberInfo &&
runtimeType == other.runtimeType &&
userID == other.userID;
@override
int get hashCode => userID.hashCode;
}
///
class UserInDept {
DeptInfo? department;
DeptMemberInfo? member;
@ -162,6 +183,7 @@ class UserInDept {
}
}
///
class DeptMemberAndSubDept {
List<DeptInfo>? departmentList;
List<DeptMemberInfo>? departmentMemberList;

Loading…
Cancel
Save