mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
fix bug
This commit is contained in:
parent
a115151616
commit
f650e73d5c
@ -50,7 +50,7 @@ func createOrganizationUser(operationID, userID, userName string) error {
|
||||
CreateTime: uint32(time.Now().Unix()),
|
||||
},
|
||||
OperationID: operationID,
|
||||
OpUserID: userID,
|
||||
OpUserID: config.Config.Manager.AppManagerUid[0],
|
||||
IsRegister: false,
|
||||
}
|
||||
if strings.Contains("@", userID) {
|
||||
|
@ -251,9 +251,9 @@ func getDepartmentParent(departmentID string, dbConn *gorm.DB) (*db.Department,
|
||||
var department db.Department
|
||||
//var parentID string
|
||||
dbConn.LogMode(true)
|
||||
// select * from departments where department_id = (select parent_id from departments where department_id= zx234fd);
|
||||
//dbConn.Table("departments").Where("department_id=?", departmentID).Pluck("parent_id", parentID).Error
|
||||
err := dbConn.Table("departments").Where("department_id=?").Find(&department).Error
|
||||
var parentID int
|
||||
dbConn.Model(&department).Where("department_id=?", departmentID).Pluck("parent_id", &parentID)
|
||||
err := dbConn.Model(&department).Where("department_id = ?", parentID).Find(&department).Error
|
||||
return &department, err
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user