Upgrade
This commit is contained in:
parent
c7218cb94c
commit
9cd717c67c
@ -3,6 +3,7 @@
|
|||||||
1.Fix bug </br>
|
1.Fix bug </br>
|
||||||
2.New organization fuction</br>
|
2.New organization fuction</br>
|
||||||
3.New uploadImage method </br>
|
3.New uploadImage method </br>
|
||||||
|
4.Fix login slow bug</br>
|
||||||
|
|
||||||
## 2.0.8
|
## 2.0.8
|
||||||
|
|
||||||
|
@ -41,5 +41,5 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
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(
|
Open_im_sdk.getDepartmentMemberAndSubDepartment(
|
||||||
new OnBaseListener(result, methodCall),
|
new OnBaseListener(result, methodCall),
|
||||||
value(methodCall, "operationID"),
|
value(methodCall, "operationID"),
|
||||||
value(methodCall, "departmentID"),
|
value(methodCall, "departmentID")
|
||||||
int2long(methodCall, "departmentOffset"),
|
|
||||||
int2long(methodCall, "departmentCount"),
|
|
||||||
int2long(methodCall, "memberOffset"),
|
|
||||||
int2long(methodCall, "memberCount")
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,12 +70,12 @@ class OrganizationManager {
|
|||||||
|
|
||||||
/// Get the sub-departments and employees under the department
|
/// Get the sub-departments and employees under the department
|
||||||
/// 获取部门下的子部门跟员工
|
/// 获取部门下的子部门跟员工
|
||||||
Future<List<UserInDept>> getDeptMemberAndSubDept({
|
Future<DeptMemberAndSubDept> getDeptMemberAndSubDept({
|
||||||
required String departmentID,
|
required String departmentID,
|
||||||
int departmentOffset = 0,
|
// int departmentOffset = 0,
|
||||||
int departmentCount = 40,
|
// int departmentCount = 40,
|
||||||
int memberOffset = 0,
|
// int memberOffset = 0,
|
||||||
int memberCount = 40,
|
// int memberCount = 40,
|
||||||
String? operationID,
|
String? operationID,
|
||||||
}) =>
|
}) =>
|
||||||
_channel
|
_channel
|
||||||
@ -83,13 +83,14 @@ class OrganizationManager {
|
|||||||
'getDepartmentMemberAndSubDepartment',
|
'getDepartmentMemberAndSubDepartment',
|
||||||
_buildParam({
|
_buildParam({
|
||||||
'departmentID': departmentID,
|
'departmentID': departmentID,
|
||||||
'departmentOffset': departmentOffset,
|
// 'departmentOffset': departmentOffset,
|
||||||
'departmentCount': departmentCount,
|
// 'departmentCount': departmentCount,
|
||||||
'memberOffset': memberOffset,
|
// 'memberOffset': memberOffset,
|
||||||
'memberCount': memberCount,
|
// 'memberCount': memberCount,
|
||||||
'operationID': Utils.checkOperationID(operationID),
|
'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) {
|
static Map _buildParam(Map param) {
|
||||||
param["ManagerName"] = "organizationManager";
|
param["ManagerName"] = "organizationManager";
|
||||||
|
@ -31,11 +31,11 @@ class DeptInfo {
|
|||||||
parentID = json['parentID'];
|
parentID = json['parentID'];
|
||||||
order = json['order'];
|
order = json['order'];
|
||||||
departmentType = json['departmentType'];
|
departmentType = json['departmentType'];
|
||||||
createTime = json['createTime '];
|
createTime = json['createTime'];
|
||||||
subDepartmentNum = json['subDepartmentNum '];
|
subDepartmentNum = json['subDepartmentNum'];
|
||||||
memberNum = json['memberNum '];
|
memberNum = json['memberNum'];
|
||||||
ex = json['ex '];
|
ex = json['ex'];
|
||||||
attachedInfo = json['attachedInfo '];
|
attachedInfo = json['attachedInfo'];
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@ -46,13 +46,23 @@ class DeptInfo {
|
|||||||
data['parentID'] = this.parentID;
|
data['parentID'] = this.parentID;
|
||||||
data['order'] = this.order;
|
data['order'] = this.order;
|
||||||
data['departmentType'] = this.departmentType;
|
data['departmentType'] = this.departmentType;
|
||||||
data['createTime '] = this.createTime;
|
data['createTime'] = this.createTime;
|
||||||
data['subDepartmentNum '] = this.subDepartmentNum;
|
data['subDepartmentNum'] = this.subDepartmentNum;
|
||||||
data['memberNum '] = this.memberNum;
|
data['memberNum'] = this.memberNum;
|
||||||
data['ex '] = this.ex;
|
data['ex'] = this.ex;
|
||||||
data['attachedInfo '] = this.attachedInfo;
|
data['attachedInfo'] = this.attachedInfo;
|
||||||
return data;
|
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 {
|
class DeptMemberInfo {
|
||||||
@ -97,20 +107,20 @@ class DeptMemberInfo {
|
|||||||
userID = json['userID'];
|
userID = json['userID'];
|
||||||
nickname = json['nickname'];
|
nickname = json['nickname'];
|
||||||
englishName = json['englishName'];
|
englishName = json['englishName'];
|
||||||
faceURL = json['faceURL '];
|
faceURL = json['faceURL'];
|
||||||
gender = json['gender '];
|
gender = json['gender'];
|
||||||
mobile = json['mobile '];
|
mobile = json['mobile'];
|
||||||
telephone = json['telephone '];
|
telephone = json['telephone'];
|
||||||
birth = json['birth '];
|
birth = json['birth'];
|
||||||
email = json['email '];
|
email = json['email'];
|
||||||
departmentID = json['departmentID '];
|
departmentID = json['departmentID'];
|
||||||
order = json['order '];
|
order = json['order'];
|
||||||
position = json['position '];
|
position = json['position'];
|
||||||
leader = json['leader '];
|
leader = json['leader'];
|
||||||
status = json['status '];
|
status = json['status'];
|
||||||
createTime = json['createTime '];
|
createTime = json['createTime'];
|
||||||
ex = json['ex '];
|
ex = json['ex'];
|
||||||
attachedInfo = json['attachedInfo '];
|
attachedInfo = json['attachedInfo'];
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@ -118,24 +128,35 @@ class DeptMemberInfo {
|
|||||||
data['userID'] = this.userID;
|
data['userID'] = this.userID;
|
||||||
data['nickname'] = this.nickname;
|
data['nickname'] = this.nickname;
|
||||||
data['englishName'] = this.englishName;
|
data['englishName'] = this.englishName;
|
||||||
data['faceURL '] = this.faceURL;
|
data['faceURL'] = this.faceURL;
|
||||||
data['gender '] = this.gender;
|
data['gender'] = this.gender;
|
||||||
data['mobile '] = this.mobile;
|
data['mobile'] = this.mobile;
|
||||||
data['telephone '] = this.telephone;
|
data['telephone'] = this.telephone;
|
||||||
data['birth '] = this.birth;
|
data['birth'] = this.birth;
|
||||||
data['email '] = this.email;
|
data['email'] = this.email;
|
||||||
data['departmentID '] = this.departmentID;
|
data['departmentID'] = this.departmentID;
|
||||||
data['order '] = this.order;
|
data['order'] = this.order;
|
||||||
data['position '] = this.position;
|
data['position'] = this.position;
|
||||||
data['leader '] = this.leader;
|
data['leader'] = this.leader;
|
||||||
data['status '] = this.status;
|
data['status'] = this.status;
|
||||||
data['createTime '] = this.createTime;
|
data['createTime'] = this.createTime;
|
||||||
data['ex '] = this.ex;
|
data['ex'] = this.ex;
|
||||||
data['attachedInfo '] = this.attachedInfo;
|
data['attachedInfo'] = this.attachedInfo;
|
||||||
return data;
|
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 {
|
class UserInDept {
|
||||||
DeptInfo? department;
|
DeptInfo? department;
|
||||||
DeptMemberInfo? member;
|
DeptMemberInfo? member;
|
||||||
@ -162,6 +183,7 @@ class UserInDept {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 部门下的子部门跟员工
|
||||||
class DeptMemberAndSubDept {
|
class DeptMemberAndSubDept {
|
||||||
List<DeptInfo>? departmentList;
|
List<DeptInfo>? departmentList;
|
||||||
List<DeptMemberInfo>? departmentMemberList;
|
List<DeptMemberInfo>? departmentMemberList;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user