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
f650e73d5c
commit
843cbe4f80
@ -24,14 +24,16 @@ func onboardingProcess(operationID, userID, userName string) {
|
|||||||
log.NewError(operationID, utils.GetSelfFuncName(), "createOrganizationUser failed", err.Error())
|
log.NewError(operationID, utils.GetSelfFuncName(), "createOrganizationUser failed", err.Error())
|
||||||
}
|
}
|
||||||
departmentID := config.Config.Demo.TestDepartMentID
|
departmentID := config.Config.Demo.TestDepartMentID
|
||||||
|
|
||||||
if err := joinTestDepartment(operationID, userID, departmentID); err != nil {
|
if err := joinTestDepartment(operationID, userID, departmentID); err != nil {
|
||||||
log.NewError(operationID, utils.GetSelfFuncName(), "joinTestDepartment failed", err.Error())
|
log.NewError(operationID, utils.GetSelfFuncName(), "joinTestDepartment failed", err.Error())
|
||||||
}
|
}
|
||||||
groupIDList, err := GetDepartmentGroupIDList(operationID, departmentID)
|
|
||||||
if err != nil {
|
//groupIDList, err := GetDepartmentGroupIDList(operationID, departmentID)
|
||||||
log.NewError(operationID, utils.GetSelfFuncName(), err.Error())
|
//if err != nil {
|
||||||
}
|
// log.NewError(operationID, utils.GetSelfFuncName(), err.Error())
|
||||||
joinGroups(operationID, userID, userName, groupIDList)
|
//}
|
||||||
|
//joinGroups(operationID, userID, userName, groupIDList)
|
||||||
log.NewInfo(operationID, utils.GetSelfFuncName(), "fineshed")
|
log.NewInfo(operationID, utils.GetSelfFuncName(), "fineshed")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,6 +41,7 @@ func createOrganizationUser(operationID, userID, userName string) error {
|
|||||||
defer func() {
|
defer func() {
|
||||||
log.NewInfo(operationID, utils.GetSelfFuncName(), userID)
|
log.NewInfo(operationID, utils.GetSelfFuncName(), userID)
|
||||||
}()
|
}()
|
||||||
|
log.NewInfo(operationID, utils.GetSelfFuncName(), "start createOrganizationUser")
|
||||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName)
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName)
|
||||||
client := organizationRpc.NewOrganizationClient(etcdConn)
|
client := organizationRpc.NewOrganizationClient(etcdConn)
|
||||||
req := &organizationRpc.CreateOrganizationUserReq{
|
req := &organizationRpc.CreateOrganizationUserReq{
|
||||||
@ -98,6 +101,9 @@ func joinTestDepartment(operationID, userID, departmentID string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func GetDepartmentGroupIDList(operationID, departmentID string) ([]string, error) {
|
func GetDepartmentGroupIDList(operationID, departmentID string) ([]string, error) {
|
||||||
|
defer func() {
|
||||||
|
log.NewInfo(operationID, utils.GetSelfFuncName(), departmentID)
|
||||||
|
}()
|
||||||
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName)
|
etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOrganizationName)
|
||||||
client := organizationRpc.NewOrganizationClient(etcdConn)
|
client := organizationRpc.NewOrganizationClient(etcdConn)
|
||||||
req := organizationRpc.GetDepartmentParentIDListReq{
|
req := organizationRpc.GetDepartmentParentIDListReq{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user