orgization

This commit is contained in:
wangchuxiao
2022-09-20 11:08:46 +08:00
committed by Xinwei Xiong(cubxxw-openim)
parent 3651292186
commit c82e35f55c
7 changed files with 312 additions and 87 deletions
@@ -89,6 +89,12 @@ func GetOrganizationUser(userID string) (error, *db.OrganizationUser) {
return err, &organizationUser
}
func GetOrganizationUsers(userIDList []string) ([]*db.OrganizationUser, error) {
var organizationUserList []*db.OrganizationUser
err := db.DB.MysqlDB.DefaultGormDB().Table("organization_users").Where("user_id in (?)", userIDList).Find(&organizationUserList).Error
return organizationUserList, err
}
func UpdateOrganizationUser(organizationUser *db.OrganizationUser, args map[string]interface{}) error {
dbConn, err := db.DB.MysqlDB.DefaultGormDB()
if err != nil {