mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-21 20:32:32 +08:00
fix bug
This commit is contained in:
parent
b3f924c081
commit
1bdf743193
@ -287,6 +287,6 @@ func GetRandomDepartmentID() (string, error) {
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
department := &db.Department{}
|
department := &db.Department{}
|
||||||
err = dbConn.Model(department).Order("RAND()").Where("related_group_id != ?", "").First(department).Error
|
err = dbConn.Model(department).Order("RAND()").Where("related_group_id != ? AND department_id != ?", "", "0").First(department).Error
|
||||||
return department.DepartmentID, err
|
return department.DepartmentID, err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user