mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
organization
This commit is contained in:
parent
e73f5981c9
commit
97303eebe4
@ -120,12 +120,12 @@ func UpdateUserInDepartment(departmentMember *db.DepartmentMember, args map[stri
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err = dbConn.Table("department_members").Where("department_id=? ADN user_id=?", departmentMember.DepartmentID, departmentMember.UserID).
|
if err = dbConn.Table("department_members").Where("department_id=? AND user_id=?", departmentMember.DepartmentID, departmentMember.UserID).
|
||||||
Updates(departmentMember).Error; err != nil {
|
Updates(departmentMember).Error; err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if args != nil {
|
if args != nil {
|
||||||
return dbConn.Table("department_members").Where("department_id=? ADN user_id=?", departmentMember.DepartmentID, departmentMember.UserID).
|
return dbConn.Table("department_members").Where("department_id=? AND user_id=?", departmentMember.DepartmentID, departmentMember.UserID).
|
||||||
Updates(args).Error
|
Updates(args).Error
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@ -136,7 +136,7 @@ func DeleteUserInDepartment(departmentID, userID string) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return dbConn.Table("department_members").Where("department_id=? ADN user_id=?", departmentID, userID).Delete(db.DepartmentMember{}).Error
|
return dbConn.Table("department_members").Where("department_id=? AND user_id=?", departmentID, userID).Delete(db.DepartmentMember{}).Error
|
||||||
}
|
}
|
||||||
|
|
||||||
func DeleteUserInAllDepartment(userID string) error {
|
func DeleteUserInAllDepartment(userID string) error {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user