From d9aa41004510112fea596db55a11b2749be322c9 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Fri, 10 Jun 2022 18:38:55 +0800 Subject: [PATCH] base64 userID --- internal/demo/register/onboarding_process.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/internal/demo/register/onboarding_process.go b/internal/demo/register/onboarding_process.go index 71e5c85d8..8f67d35bb 100644 --- a/internal/demo/register/onboarding_process.go +++ b/internal/demo/register/onboarding_process.go @@ -189,6 +189,7 @@ func onboardingProcessNotification(operationID, userID, groupID string) { } func oaNotification(operationID, userID string) { + var err error elem := manage.OANotificationElem{ NotificationName: "入职通知", NotificationFaceURL: "", @@ -202,20 +203,22 @@ func oaNotification(operationID, userID string) { FileElem: manage.FileElem{}, Ex: "", } - bytes, err := json.Marshal(elem) - if err != nil { - log.NewError(operationID, utils.GetSelfFuncName(), "elem: ", elem, err.Error()) - return - } sysNotification := &msg.NotificationMsg{ SendID: config.Config.Manager.AppManagerUid[0], RecvID: userID, - Content: bytes, MsgFrom: constant.SysMsgType, ContentType: constant.OANotification, SessionType: constant.NotificationChatType, OperationID: operationID, } + var tips commonPb.TipsComm + tips.JsonDetail = utils.StructToJsonString(elem) + sysNotification.Content, err = proto.Marshal(&tips) + if err != nil { + log.NewError(operationID, utils.GetSelfFuncName(), "elem: ", elem, err.Error()) + return + } + msg.Notification(sysNotification) }