|
|
@ -21,7 +21,8 @@ import (
|
|
|
|
"time"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
func onboardingProcess(operationID, userID, userName string) {
|
|
|
|
func onboardingProcess(operationID, userID, userName, faceURL string) {
|
|
|
|
|
|
|
|
log.NewInfo(operationID, utils.GetSelfFuncName(), userName, userID, faceURL)
|
|
|
|
if err := createOrganizationUser(operationID, userID, userName); err != nil {
|
|
|
|
if err := createOrganizationUser(operationID, userID, userName); err != nil {
|
|
|
|
log.NewError(operationID, utils.GetSelfFuncName(), "createOrganizationUser failed", err.Error())
|
|
|
|
log.NewError(operationID, utils.GetSelfFuncName(), "createOrganizationUser failed", err.Error())
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -39,8 +40,7 @@ func onboardingProcess(operationID, userID, userName string) {
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
log.NewError(operationID, utils.GetSelfFuncName(), err.Error())
|
|
|
|
log.NewError(operationID, utils.GetSelfFuncName(), err.Error())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
log.NewInfo(operationID, utils.GetSelfFuncName(), groupIDList)
|
|
|
|
joinGroups(operationID, userID, userName, faceURL, groupIDList)
|
|
|
|
joinGroups(operationID, userID, userName, groupIDList)
|
|
|
|
|
|
|
|
log.NewInfo(operationID, utils.GetSelfFuncName(), "fineshed")
|
|
|
|
log.NewInfo(operationID, utils.GetSelfFuncName(), "fineshed")
|
|
|
|
oaNotification(operationID, userID)
|
|
|
|
oaNotification(operationID, userID)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -157,7 +157,7 @@ func GetDepartmentGroupIDList(operationID, departmentID string) ([]string, error
|
|
|
|
return getDepartmentParentIDListResp.GroupIDList, nil
|
|
|
|
return getDepartmentParentIDListResp.GroupIDList, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func joinGroups(operationID, userID, userName string, groupIDList []string) {
|
|
|
|
func joinGroups(operationID, userID, userName, faceURL string, groupIDList []string) {
|
|
|
|
defer func() {
|
|
|
|
defer func() {
|
|
|
|
log.NewInfo(operationID, utils.GetSelfFuncName(), userID, groupIDList)
|
|
|
|
log.NewInfo(operationID, utils.GetSelfFuncName(), userID, groupIDList)
|
|
|
|
}()
|
|
|
|
}()
|
|
|
@ -185,12 +185,12 @@ func joinGroups(operationID, userID, userName string, groupIDList []string) {
|
|
|
|
log.NewError(req.OperationID, utils.GetSelfFuncName(), resp)
|
|
|
|
log.NewError(req.OperationID, utils.GetSelfFuncName(), resp)
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onboardingProcessNotification(operationID, userID, groupID, userName)
|
|
|
|
onboardingProcessNotification(operationID, userID, groupID, userName, faceURL)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// welcome user join department notification
|
|
|
|
// welcome user join department notification
|
|
|
|
func onboardingProcessNotification(operationID, userID, groupID, userName string) {
|
|
|
|
func onboardingProcessNotification(operationID, userID, groupID, userName, faceURL string) {
|
|
|
|
defer func() {
|
|
|
|
defer func() {
|
|
|
|
log.NewInfo(operationID, utils.GetSelfFuncName(), userID, groupID)
|
|
|
|
log.NewInfo(operationID, utils.GetSelfFuncName(), userID, groupID)
|
|
|
|
}()
|
|
|
|
}()
|
|
|
@ -211,6 +211,8 @@ func onboardingProcessNotification(operationID, userID, groupID, userName string
|
|
|
|
ContentType: constant.Text,
|
|
|
|
ContentType: constant.Text,
|
|
|
|
SessionType: constant.GroupChatType,
|
|
|
|
SessionType: constant.GroupChatType,
|
|
|
|
OperationID: operationID,
|
|
|
|
OperationID: operationID,
|
|
|
|
|
|
|
|
SenderNickname: userName,
|
|
|
|
|
|
|
|
SenderFaceURL: faceURL,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// notification user join group
|
|
|
|
// notification user join group
|
|
|
|