|
|
|
@ -116,19 +116,19 @@ func GetDepartmentGroupIDList(operationID, departmentID string) ([]string, error
|
|
|
|
|
log.NewError(req.OperationID, utils.GetSelfFuncName(), resp)
|
|
|
|
|
return nil, errors.New(resp.ErrMsg)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
resp.ParentIDList = append(resp.ParentIDList, departmentID)
|
|
|
|
|
getDepartmentRelatedGroupIDListReq := organizationRpc.GetDepartmentRelatedGroupIDListReq{OperationID: operationID, DepartmentIDList: resp.ParentIDList}
|
|
|
|
|
getDepartmentParentIDListResp, err := client.GetDepartmentRelatedGroupIDList(context.Background(), &getDepartmentRelatedGroupIDListReq)
|
|
|
|
|
if err != nil {
|
|
|
|
|
log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), getDepartmentRelatedGroupIDListReq.String())
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if getDepartmentParentIDListResp.ErrCode != 0 {
|
|
|
|
|
log.NewError(req.OperationID, utils.GetSelfFuncName(), getDepartmentParentIDListResp)
|
|
|
|
|
return nil, errors.New(getDepartmentParentIDListResp.ErrMsg)
|
|
|
|
|
}
|
|
|
|
|
return getDepartmentParentIDListResp.GroupIDList, nil
|
|
|
|
|
return resp.ParentIDList, nil
|
|
|
|
|
//resp.ParentIDList = append(resp.ParentIDList, departmentID)
|
|
|
|
|
//getDepartmentRelatedGroupIDListReq := organizationRpc.GetDepartmentRelatedGroupIDListReq{OperationID: operationID, DepartmentIDList: resp.ParentIDList}
|
|
|
|
|
//getDepartmentParentIDListResp, err := client.GetDepartmentRelatedGroupIDList(context.Background(), &getDepartmentRelatedGroupIDListReq)
|
|
|
|
|
//if err != nil {
|
|
|
|
|
// log.NewError(operationID, utils.GetSelfFuncName(), err.Error(), getDepartmentRelatedGroupIDListReq.String())
|
|
|
|
|
// return nil, err
|
|
|
|
|
//}
|
|
|
|
|
//if getDepartmentParentIDListResp.ErrCode != 0 {
|
|
|
|
|
// log.NewError(req.OperationID, utils.GetSelfFuncName(), getDepartmentParentIDListResp)
|
|
|
|
|
// return nil, errors.New(getDepartmentParentIDListResp.ErrMsg)
|
|
|
|
|
//}
|
|
|
|
|
//return getDepartmentParentIDListResp.GroupIDList, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func joinGroups(operationID, userID, userName string, groupIDList []string) {
|
|
|
|
|