diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 6f2d039da..cf1783117 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -148,8 +148,6 @@ func main() { officeGroup.POST("/get_work_moment_by_id", office.GetWorkMomentByID) officeGroup.POST("/get_user_work_moments", office.GetUserWorkMoments) officeGroup.POST("/get_user_friend_work_moments", office.GetUserFriendWorkMoments) - officeGroup.POST("/get_user_work_moments_comments_msg", office.GetUserWorkMomentsCommentsMsg) - officeGroup.POST("/clear_user_work_moments_comments_msg", office.ClearUserWorkMomentsCommentsMsg) officeGroup.POST("/set_user_work_moments_level", office.SetUserWorkMomentsLevel) } diff --git a/internal/api/office/work_moments.go b/internal/api/office/work_moments.go index 108ab5858..e948992df 100644 --- a/internal/api/office/work_moments.go +++ b/internal/api/office/work_moments.go @@ -201,7 +201,10 @@ func GetWorkMomentByID(c *gin.Context) { if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil { log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error()) } - resp.Data.WorkMoment = respPb.WorkMoment + //resp.Data.WorkMoment = respPb.WorkMoment + if err := utils.CopyStructFields(&resp.Data.WorkMoment, respPb.WorkMoment); err != nil { + log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error()) + } log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp) c.JSON(http.StatusOK, resp) } @@ -242,7 +245,9 @@ func GetUserWorkMoments(c *gin.Context) { if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil { log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error()) } - resp.Data.WorkMoments = respPb.WorkMoments + if err := utils.CopyStructFields(&resp.Data.WorkMoments, respPb.WorkMoments); err != nil { + log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error()) + } resp.Data.ShowNumber = respPb.Pagination.ShowNumber resp.Data.CurrentPage = respPb.Pagination.CurrentPage log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp) @@ -285,52 +290,11 @@ func GetUserFriendWorkMoments(c *gin.Context) { if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil { log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error()) } - resp.Data.WorkMoments = respPb.WorkMoments - resp.Data.ShowNumber = respPb.Pagination.ShowNumber - resp.Data.CurrentPage = respPb.Pagination.CurrentPage - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp) - c.JSON(http.StatusOK, resp) -} - -func GetUserWorkMomentsCommentsMsg(c *gin.Context) { - var ( - req apiStruct.GetUserWorkMomentsCommentsMsgReq - resp apiStruct.GetUserWorkMomentsCommentsMsgResp - reqPb pbOffice.GetUserWorkMomentsCommentsMsgReq - respPb *pbOffice.GetUserWorkMomentsCommentsMsgResp - ) - if err := c.BindJSON(&req); err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error()) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()}) - return - } - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req) - ok, userID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) - if !ok { - log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) - return - } - reqPb.OperationID = req.OperationID - reqPb.Pagination = &pbCommon.RequestPagination{ - PageNumber: req.PageNumber, - ShowNumber: req.ShowNumber, - } - reqPb.UserID = userID - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName) - client := pbOffice.NewOfficeServiceClient(etcdConn) - respPb, err := client.GetUserWorkMomentsCommentsMsg(context.Background(), &reqPb) - if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserWorkMomentsCommentsMsg rpc failed", err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserWorkMomentsCommentsMsg rpc server failed" + err.Error()}) - return - } - if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil { + if err := utils.CopyStructFields(&resp.Data.WorkMoments, respPb.WorkMoments); err != nil { log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error()) } - resp.Data.CurrentPage = respPb.Pagination.CurrentPage resp.Data.ShowNumber = respPb.Pagination.ShowNumber - resp.Data.CommentMsgs = respPb.CommentsMsgs + resp.Data.CurrentPage = respPb.Pagination.CurrentPage log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp) c.JSON(http.StatusOK, resp) } @@ -372,39 +336,3 @@ func SetUserWorkMomentsLevel(c *gin.Context) { log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp) c.JSON(http.StatusOK, resp) } - -func ClearUserWorkMomentsCommentsMsg(c *gin.Context) { - var ( - req apiStruct.ClearUserWorkMomentsCommentsMsgReq - resp apiStruct.ClearUserWorkMomentsCommentsMsgResp - reqPb pbOffice.ClearUserWorkMomentsCommentsMsgReq - respPb *pbOffice.ClearUserWorkMomentsCommentsMsgResp - ) - if err := c.BindJSON(&req); err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "bind json failed", err.Error()) - c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()}) - return - } - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req) - ok, userID := token_verify.GetUserIDFromToken(c.Request.Header.Get("token"), req.OperationID) - if !ok { - log.NewError(req.OperationID, "GetUserIDFromToken false ", c.Request.Header.Get("token")) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "GetUserIDFromToken failed"}) - return - } - reqPb.UserID = userID - reqPb.OperationID = req.OperationID - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfficeName) - client := pbOffice.NewOfficeServiceClient(etcdConn) - respPb, err := client.ClearUserWorkMomentsCommentsMsg(context.Background(), &reqPb) - if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "ClearUserWorkMomentsCommentsMsg rpc failed", err.Error()) - c.JSON(http.StatusInternalServerError, gin.H{"errCode": 500, "errMsg": "ClearUserWorkMomentsCommentsMsg rpc server failed" + err.Error()}) - return - } - if err := utils.CopyStructFields(&resp, respPb.CommonResp); err != nil { - log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error()) - } - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp) - c.JSON(http.StatusOK, resp) -} diff --git a/internal/rpc/msg/work_moments_notification.go b/internal/rpc/msg/work_moments_notification.go index 8e55ece11..7c33f7bb3 100644 --- a/internal/rpc/msg/work_moments_notification.go +++ b/internal/rpc/msg/work_moments_notification.go @@ -1,47 +1,31 @@ package msg import ( - "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" - "Open_IM/pkg/common/db" "Open_IM/pkg/common/log" - "Open_IM/pkg/grpc-etcdv3/getcdv3" - pbChat "Open_IM/pkg/proto/chat" - pbCommon "Open_IM/pkg/proto/sdk_ws" + pbOffice "Open_IM/pkg/proto/office" "Open_IM/pkg/utils" - "context" - "encoding/json" - "strings" + "github.com/golang/protobuf/proto" ) -func CommentOneWorkMomentNotification(operationID, recvID string, comment db.CommentMsg, user db.User) { - log.NewInfo(operationID, utils.GetSelfFuncName(), "args: ", recvID, user, comment) - var req pbChat.SendMsgReq - var msgData pbCommon.MsgData - msgData.SendID = user.UserID - msgData.RecvID = recvID - msgData.ContentType = constant.WorkMomentNewCommentNotification - msgData.SessionType = constant.SingleChatType - msgData.MsgFrom = constant.UserMsgType - bytes, err := json.Marshal(comment) +func WorkMomentSendNotification(operationID, sendID, recvID string, notificationMsg *pbOffice.WorkMomentNotificationMsg) { + log.NewInfo(operationID, utils.GetSelfFuncName(), recvID) + bytes, err := proto.Marshal(notificationMsg) if err != nil { - log.NewError(operationID, utils.GetSelfFuncName(), "marshal failed", err.Error()) + log.NewError(operationID, utils.GetSelfFuncName(), "proto marshal failed", err.Error()) } - msgData.Content = bytes - msgData.SenderFaceURL = user.FaceURL - msgData.SenderNickname = user.Nickname - msgData.CreateTime = utils.GetCurrentTimestampByMill() - msgData.ClientMsgID = utils.GetMsgID(user.UserID) - req.MsgData = &msgData - req.OperationID = operationID - etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) - client := pbChat.NewChatClient(etcdConn) - respPb, err := client.SendMsg(context.Background(), &req) - if err != nil { - log.NewError(operationID, utils.GetSelfFuncName(), "send msg failed", err.Error()) - return - } - if respPb.ErrCode != 0 { - log.NewError(operationID, utils.GetSelfFuncName(), "send tag msg failed ", respPb) + WorkMomentNotification(operationID, sendID, recvID, bytes) +} + +func WorkMomentNotification(operationID, sendID, recvID string, content []byte) { + n := &NotificationMsg{ + SendID: sendID, + RecvID: recvID, + Content: content, + MsgFrom: constant.UserMsgType, + ContentType: constant.WorkMomentNotification, + SessionType: constant.UserMsgType, + OperationID: operationID, } + Notification(n) } diff --git a/internal/rpc/office/office.go b/internal/rpc/office/office.go index 3849f17d2..734c6a92e 100644 --- a/internal/rpc/office/office.go +++ b/internal/rpc/office/office.go @@ -270,20 +270,73 @@ func (s *officeServer) GetUserTagByID(_ context.Context, req *pbOffice.GetUserTa func (s *officeServer) CreateOneWorkMoment(_ context.Context, req *pbOffice.CreateOneWorkMomentReq) (resp *pbOffice.CreateOneWorkMomentResp, err error) { log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String()) resp = &pbOffice.CreateOneWorkMomentResp{CommonResp: &pbOffice.CommonResp{}} - workMoment := db.WorkMoment{Comments: []*db.Comment{}, LikeUsers: []*db.LikeUser{}} + workMoment := db.WorkMoment{ + Comments: []*db.Comment{}, + LikeUserList: []*db.LikeUser{}, + } + createUser, err := imdb.GetUserByUserID(req.WorkMoment.UserID) + if err != nil { + log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserByUserID", err.Error()) + resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg} + return resp, nil + } + workMoment.UserName = createUser.Nickname + workMoment.FaceURL = createUser.FaceURL if err := utils.CopyStructFields(&workMoment, req.WorkMoment); err != nil { log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields failed", err.Error()) } + workMoment.PermissionUserIDList = s.getPermissionUserIDList(req.OperationID, req.WorkMoment.PermissionGroupIDList, req.WorkMoment.PermissionUserIDList) + for _, userID := range req.WorkMoment.AtUserIDList { + userName, err := imdb.GetUserNameByUserID(userID) + if err != nil { + log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserNameByUserID failed", userID, err.Error()) + continue + } + workMoment.AtUserList = append(workMoment.AtUserList, &db.AtUser{ + UserID: userID, + UserName: userName, + }) + } + log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "workMoment to create", workMoment) err = db.DB.CreateOneWorkMoment(&workMoment) if err != nil { log.NewError(req.OperationID, utils.GetSelfFuncName(), "CreateOneWorkMoment", err.Error()) resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg} return resp, nil } + + // send notification to at users + for _, atUser := range req.WorkMoment.AtUserIDList { + workMomentNotificationMsg := &pbOffice.WorkMomentNotificationMsg{ + NotificationMsgType: constant.WorkMomentAtUserNotification, + WorkMomentID: workMoment.WorkMomentID, + WorkMomentContent: workMoment.Content, + UserID: workMoment.UserID, + FaceURL: createUser.FaceURL, + UserName: createUser.Nickname, + } + msg.WorkMomentSendNotification(req.OperationID, workMoment.UserID, atUser, workMomentNotificationMsg) + } log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String()) return resp, nil } +// count and distinct permission users +func (s *officeServer) getPermissionUserIDList(operationID string, groupIDList, userIDList []string) []string { + var permissionUserIDList []string + for _, groupID := range groupIDList { + GroupMemberIDList, err := imdb.GetGroupMemberIDListByGroupID(groupID) + if err != nil { + log.NewError(operationID, utils.GetSelfFuncName(), "GetGroupMemberIDListByGroupID failed", groupID, err.Error()) + continue + } + permissionUserIDList = append(permissionUserIDList, GroupMemberIDList...) + } + permissionUserIDList = append(permissionUserIDList, userIDList...) + permissionUserIDList = utils.RemoveRepeatedStringInList(permissionUserIDList) + return permissionUserIDList +} + func (s *officeServer) DeleteOneWorkMoment(_ context.Context, req *pbOffice.DeleteOneWorkMomentReq) (resp *pbOffice.DeleteOneWorkMomentResp, err error) { log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String()) resp = &pbOffice.DeleteOneWorkMomentResp{CommonResp: &pbOffice.CommonResp{}} @@ -295,7 +348,7 @@ func (s *officeServer) DeleteOneWorkMoment(_ context.Context, req *pbOffice.Dele } log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "workMoment", workMoment) if workMoment.UserID != req.UserID { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "workMoment.UserID != req.WorkMomentID ", workMoment, req.WorkMomentID) + log.NewError(req.OperationID, utils.GetSelfFuncName(), "workMoment.UserID != req.WorkMomentID, delete failed", workMoment, req.WorkMomentID) resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrAccess.ErrCode, ErrMsg: constant.ErrAccess.ErrMsg} return resp, nil } @@ -311,15 +364,17 @@ func (s *officeServer) DeleteOneWorkMoment(_ context.Context, req *pbOffice.Dele func isUserCanSeeWorkMoment(userID string, workMoment db.WorkMoment) bool { if userID != workMoment.UserID { - if utils.IsContain(userID, workMoment.WhoCantSeeUserIDList) { - return false - } - if utils.IsContain(userID, workMoment.WhoCanSeeUserIDList) { + switch workMoment.Permission { + case constant.WorkMomentPublic: return true - } - if workMoment.IsPrivate { + case constant.WorkMomentPrivate: return false + case constant.WorkMomentPermissionCanSee: + return utils.IsContain(userID, workMoment.PermissionUserIDList) + case constant.WorkMomentPermissionCantSee: + return !utils.IsContain(userID, workMoment.PermissionUserIDList) } + return false } return true } @@ -333,11 +388,20 @@ func (s *officeServer) LikeOneWorkMoment(_ context.Context, req *pbOffice.LikeOn resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg} return resp, nil } - if err = db.DB.LikeOneWorkMoment(req.UserID, userName, req.WorkMomentID); err != nil { + workMoment, err := db.DB.LikeOneWorkMoment(req.UserID, userName, req.WorkMomentID) + if err != nil { log.NewError(req.OperationID, utils.GetSelfFuncName(), "LikeOneWorkMoment failed ", err.Error()) resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg} return resp, nil } + workMomentNotificationMsg := &pbOffice.WorkMomentNotificationMsg{ + NotificationMsgType: constant.WorkMomentLikeNotification, + WorkMomentID: workMoment.WorkMomentID, + WorkMomentContent: workMoment.Content, + UserID: workMoment.UserID, + } + // send notification + msg.WorkMomentSendNotification(req.OperationID, req.UserID, workMoment.UserID, workMomentNotificationMsg) log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String()) return resp, nil } @@ -360,7 +424,7 @@ func (s *officeServer) CommentOneWorkMoment(_ context.Context, req *pbOffice.Com return resp, nil } } - comment := db.Comment{ + comment := &db.Comment{ UserID: req.UserID, UserName: commentUser.Nickname, ReplyUserID: req.ReplyUserID, @@ -374,18 +438,25 @@ func (s *officeServer) CommentOneWorkMoment(_ context.Context, req *pbOffice.Com resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg} return resp, nil } - commentMsg := db.CommentMsg{ - Comment: comment, - UserID: workMoment.UserID, - WorkMomentID: workMoment.WorkMomentID, - WorkMomentContent: workMoment.Content, - } - if err = db.DB.CreateUserWorkMomentsCommentsMsg(commentMsg); err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), err.Error()) + workMomentNotificationMsg := &pbOffice.WorkMomentNotificationMsg{ + NotificationMsgType: constant.WorkMomentCommentNotification, + WorkMomentID: workMoment.WorkMomentID, + WorkMomentContent: workMoment.Content, + UserID: workMoment.UserID, + Comment: &pbOffice.Comment{ + UserID: comment.UserID, + UserName: comment.UserName, + FaceURL: commentUser.FaceURL, + ReplyUserID: comment.ReplyUserID, + ReplyUserName: comment.ReplyUserName, + ContentID: comment.ContentID, + Content: comment.Content, + CreateTime: comment.CreateTime, + }, } - msg.CommentOneWorkMomentNotification(req.OperationID, workMoment.UserID, commentMsg, *commentUser) + msg.WorkMomentSendNotification(req.OperationID, req.UserID, workMoment.UserID, workMomentNotificationMsg) if req.ReplyUserID != "" { - msg.CommentOneWorkMomentNotification(req.OperationID, req.ReplyUserID, commentMsg, *commentUser) + msg.WorkMomentSendNotification(req.OperationID, req.UserID, req.ReplyUserID, workMomentNotificationMsg) } log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String()) return resp, nil @@ -405,6 +476,9 @@ func (s *officeServer) GetWorkMomentByID(_ context.Context, req *pbOffice.GetWor } canSee := isUserCanSeeWorkMoment(req.OpUserID, *workMoment) log.Debug(req.OperationID, utils.GetSelfFuncName(), canSee, req.OpUserID, *workMoment) + if !canSee { + log.NewError(req.OperationID, utils.GetSelfFuncName(), "workMoments not access to user", canSee, workMoment, req.OpUserID) + } if err := utils.CopyStructFields(resp.WorkMoment, workMoment); err != nil { log.NewError(req.OperationID, utils.GetSelfFuncName(), "CopyStructFields", err.Error()) } @@ -455,34 +529,6 @@ func (s *officeServer) GetUserFriendWorkMoments(_ context.Context, req *pbOffice return resp, nil } -func (s *officeServer) GetUserWorkMomentsCommentsMsg(_ context.Context, req *pbOffice.GetUserWorkMomentsCommentsMsgReq) (resp *pbOffice.GetUserWorkMomentsCommentsMsgResp, err error) { - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String()) - resp = &pbOffice.GetUserWorkMomentsCommentsMsgResp{CommonResp: &pbOffice.CommonResp{}} - resp.CommentsMsgs = make([]*pbOffice.CommentsMsg, 0) - workMomentsCommentMsgs, err := db.DB.GetUserWorkMomentsCommentsMsg(req.UserID, req.Pagination.ShowNumber, req.Pagination.PageNumber) - if err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserWorkMomentsCommentsMsg", err.Error()) - resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg} - return resp, nil - } - log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "workMomentsCommentMsgs: ", workMomentsCommentMsgs) - for _, commentMsg := range workMomentsCommentMsgs { - comment := pbOffice.Comment{} - if err := utils.CopyStructFields(&comment, commentMsg); err != nil { - log.NewDebug(req.OperationID, utils.GetSelfFuncName(), err.Error()) - } - resp.CommentsMsgs = append(resp.CommentsMsgs, &pbOffice.CommentsMsg{ - Comment: &comment, - WorkMomentID: commentMsg.WorkMomentID, - Content: commentMsg.WorkMomentContent, - UserID: req.UserID, - }) - } - resp.Pagination = &pbCommon.ResponsePagination{CurrentPage: req.Pagination.PageNumber, ShowNumber: req.Pagination.ShowNumber} - log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String()) - return resp, nil -} - func (s *officeServer) SetUserWorkMomentsLevel(_ context.Context, req *pbOffice.SetUserWorkMomentsLevelReq) (resp *pbOffice.SetUserWorkMomentsLevelResp, err error) { log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String()) resp = &pbOffice.SetUserWorkMomentsLevelResp{CommonResp: &pbOffice.CommonResp{}} @@ -495,14 +541,9 @@ func (s *officeServer) SetUserWorkMomentsLevel(_ context.Context, req *pbOffice. return resp, nil } -func (s *officeServer) ClearUserWorkMomentsCommentsMsg(_ context.Context, req *pbOffice.ClearUserWorkMomentsCommentsMsgReq) (resp *pbOffice.ClearUserWorkMomentsCommentsMsgResp, err error) { +func (s *officeServer) ChangeWorkMomentPermission(_ context.Context, req *pbOffice.ChangeWorkMomentPermissionReq) (resp *pbOffice.ChangeWorkMomentPermissionResp, err error) { log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String()) - resp = &pbOffice.ClearUserWorkMomentsCommentsMsgResp{CommonResp: &pbOffice.CommonResp{}} - if err := db.DB.ClearUserWorkMomentsCommentsMsg(req.UserID); err != nil { - log.NewError(req.OperationID, utils.GetSelfFuncName(), "ClearUserWorkMomentsCommentsMsg", err.Error()) - resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg} - return resp, nil - } + resp = &pbOffice.ChangeWorkMomentPermissionResp{CommonResp: &pbOffice.CommonResp{}} log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp.String()) return resp, nil } diff --git a/pkg/base_info/work_moments_struct.go b/pkg/base_info/work_moments_struct.go index 107b74b70..d39f3f981 100644 --- a/pkg/base_info/work_moments_struct.go +++ b/pkg/base_info/work_moments_struct.go @@ -44,10 +44,38 @@ type GetWorkMomentByIDReq struct { office.GetWorkMomentByIDReq } +type WorkMoment struct { + WorkMomentID string `json:"workMomentID"` + UserID string `json:"userID"` + Content string `json:"content"` + LikeUsers []*LikeUser `json:"likeUsers"` + Comments []*Comment `json:"comments"` + Permission int32 `json:"permission"` + PermissionUserIDList []string `json:"permissionUserIDList"` + PermissionGroupIDList []string `json:"permissionGroupIDList"` + AtUserIDList []string `json:"atUserIDList"` + CreateTime int32 `json:"createTime,omitempty"` +} + +type LikeUser struct { + UserID string `json:"userID"` + UserName string `json:"userName"` +} + +type Comment struct { + UserID string `json:"userID"` + UserName string `json:"userName"` + ReplyUserID string `json:"replyUserID"` + ReplyUserName string `json:"replyUserName"` + ContentID string `json:"contentID"` + Content string `json:"content"` + CreateTime int32 `json:"createTime"` +} + type GetWorkMomentByIDResp struct { CommResp Data struct { - WorkMoment *office.WorkMoment `json:"workMoment"` + WorkMoment *WorkMoment `json:"workMoment"` } `json:"data"` } @@ -58,9 +86,9 @@ type GetUserWorkMomentsReq struct { type GetUserWorkMomentsResp struct { CommResp Data struct { - WorkMoments []*office.WorkMoment `json:"workMoments"` - CurrentPage int32 `json:"currentPage"` - ShowNumber int32 `json:"showNumber"` + WorkMoments []*WorkMoment `json:"workMoments"` + CurrentPage int32 `json:"currentPage"` + ShowNumber int32 `json:"showNumber"` } `json:"data"` } @@ -71,22 +99,9 @@ type GetUserFriendWorkMomentsReq struct { type GetUserFriendWorkMomentsResp struct { CommResp Data struct { - WorkMoments []*office.WorkMoment `json:"workMoments"` - CurrentPage int32 `json:"currentPage"` - ShowNumber int32 `json:"showNumber"` - } `json:"data"` -} - -type GetUserWorkMomentsCommentsMsgReq struct { - WorkMomentsUserCommonReq -} - -type GetUserWorkMomentsCommentsMsgResp struct { - CommResp - Data struct { - CommentMsgs []*office.CommentsMsg `json:"comments"` - CurrentPage int32 `json:"currentPage"` - ShowNumber int32 `json:"showNumber"` + WorkMoments []*WorkMoment `json:"workMoments"` + CurrentPage int32 `json:"currentPage"` + ShowNumber int32 `json:"showNumber"` } `json:"data"` } @@ -97,11 +112,3 @@ type SetUserWorkMomentsLevelReq struct { type SetUserWorkMomentsLevelResp struct { CommResp } - -type ClearUserWorkMomentsCommentsMsgReq struct { - office.ClearUserWorkMomentsCommentsMsgReq -} - -type ClearUserWorkMomentsCommentsMsgResp struct { - CommResp -} diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index dcef201f5..9e2046b15 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -91,8 +91,8 @@ const ( OrganizationChangedNotification = 1801 - WorkMomentNotificationStart = 1900 - WorkMomentNewCommentNotification = 1901 + WorkMomentNotificationBegin = 1900 + WorkMomentNotification = 1901 NotificationEnd = 2000 @@ -183,6 +183,17 @@ const ( OtherType = 1 VideoType = 2 ImageType = 3 + + // workMoment permission + WorkMomentPublic = 0 + WorkMomentPrivate = 1 + WorkMomentPermissionCanSee = 2 + WorkMomentPermissionCantSee = 3 + + // workMoment sdk notification type + WorkMomentCommentNotification = 0 + WorkMomentLikeNotification = 1 + WorkMomentAtUserNotification = 2 ) var ContentType2PushContent = map[int64]string{ diff --git a/pkg/common/db/mongoModel.go b/pkg/common/db/mongoModel.go index c0107dd65..20bf470f2 100644 --- a/pkg/common/db/mongoModel.go +++ b/pkg/common/db/mongoModel.go @@ -568,15 +568,22 @@ func (d *DataBases) GetTagSendLogs(userID string, showNumber, pageNumber int32) type WorkMoment struct { WorkMomentID string `bson:"work_moment_id"` UserID string `bson:"user_id"` + UserName string `bson:"user_name"` + FaceURL string `bson:"face_url"` Content string `bson:"content"` - LikeUsers []*LikeUser `bson:"like_users"` + LikeUserList []*LikeUser `bson:"like_user_list"` + AtUserList []*AtUser `bson:"at_user_list"` Comments []*Comment `bson:"comments"` - WhoCanSeeUserIDList []string `bson:"who_can_see_user_id_list"` - WhoCantSeeUserIDList []string `bson:"who_cant_see_user_id_list"` - IsPrivate bool `bson:"is_private"` + PermissionUserIDList []string `bson:"permission_user_id_list"` + Permission int32 `bson:"is_private"` CreateTime int32 `bson:"create_time"` } +type AtUser struct { + UserID string `bson:"user_id"` + UserName string `bson:"user_name"` +} + type LikeUser struct { UserID string `bson:"user_id"` UserName string `bson:"user_name"` @@ -617,67 +624,33 @@ func (d *DataBases) GetWorkMomentByID(workMomentID string) (*WorkMoment, error) return workMoment, err } -func (d *DataBases) LikeOneWorkMoment(likeUserID, userName, workMomentID string) error { +func (d *DataBases) LikeOneWorkMoment(likeUserID, userName, workMomentID string) (*WorkMoment, error) { workMoment, err := d.GetWorkMomentByID(workMomentID) if err != nil { - return err + return nil, err } var isAlreadyLike bool - for i, user := range workMoment.LikeUsers { + for i, user := range workMoment.LikeUserList { if likeUserID == user.UserID { isAlreadyLike = true - workMoment.LikeUsers = append(workMoment.LikeUsers[0:i], workMoment.LikeUsers[i+1:]...) + workMoment.LikeUserList = append(workMoment.LikeUserList[0:i], workMoment.LikeUserList[i+1:]...) } } if !isAlreadyLike { - workMoment.LikeUsers = append(workMoment.LikeUsers, &LikeUser{UserID: likeUserID, UserName: userName}) + workMoment.LikeUserList = append(workMoment.LikeUserList, &LikeUser{UserID: likeUserID, UserName: userName}) } - log.Info("", utils.GetSelfFuncName(), workMoment) + log.NewDebug("", utils.GetSelfFuncName(), workMoment) ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second) c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cWorkMoment) - _, err = c.UpdateOne(ctx, bson.M{"work_moment_id": workMomentID}, bson.M{"$set": bson.M{"like_users": workMoment.LikeUsers}}) - return err + _, err = c.UpdateOne(ctx, bson.M{"work_moment_id": workMomentID}, bson.M{"$set": bson.M{"like_users": workMoment.LikeUserList}}) + return workMoment, err } func (d *DataBases) SetUserWorkMomentsLevel(userID string, level int32) error { return nil } -func (d *DataBases) CreateUserWorkMomentsCommentsMsg(msg CommentMsg) error { - ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second) - c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cCommentMsg) - _, err := c.InsertOne(ctx, msg) - return err -} - -func (d *DataBases) ClearUserWorkMomentsCommentsMsg(userID string) error { - ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second) - c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cCommentMsg) - _, err := c.DeleteOne(ctx, bson.M{"user_id": userID}) - return err -} - -type CommentMsg struct { - WorkMomentID string `bson:"work_moment" json:"work_moment"` - WorkMomentContent string `bson:"work_moment_content" json:"work_moment_content"` - UserID string `bson:"user_id" json:"user_id"` - Comment -} - -func (d *DataBases) GetUserWorkMomentsCommentsMsg(userID string, showNumber, pageNumber int32) ([]CommentMsg, error) { - ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second) - c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cCommentMsg) - var commentMsgList []CommentMsg - findOpts := options.Find().SetLimit(int64(showNumber)).SetSkip(int64(showNumber) * (int64(pageNumber) - 1)).SetSort(bson.M{"create_time": -1}) - result, err := c.Find(ctx, bson.M{"user_id": userID}, findOpts) - if err != nil { - return commentMsgList, err - } - err = result.All(ctx, &commentMsgList) - return commentMsgList, err -} - -func (d *DataBases) CommentOneWorkMoment(comment Comment, workMomentID string) (WorkMoment, error) { +func (d *DataBases) CommentOneWorkMoment(comment *Comment, workMomentID string) (WorkMoment, error) { comment.ContentID = generateWorkMomentCommentID(workMomentID) ctx, _ := context.WithTimeout(context.Background(), time.Duration(config.Config.Mongo.DBTimeout)*time.Second) c := d.mongoClient.Database(config.Config.Mongo.DBDatabase).Collection(cWorkMoment) diff --git a/pkg/proto/office/office.pb.go b/pkg/proto/office/office.pb.go index b9e3ad6c1..8e4f76511 100644 --- a/pkg/proto/office/office.pb.go +++ b/pkg/proto/office/office.pb.go @@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{0} + return fileDescriptor_office_1d2fa21c23f88044, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -82,7 +82,7 @@ func (m *TagUser) Reset() { *m = TagUser{} } func (m *TagUser) String() string { return proto.CompactTextString(m) } func (*TagUser) ProtoMessage() {} func (*TagUser) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{1} + return fileDescriptor_office_1d2fa21c23f88044, []int{1} } func (m *TagUser) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TagUser.Unmarshal(m, b) @@ -129,7 +129,7 @@ func (m *Tag) Reset() { *m = Tag{} } func (m *Tag) String() string { return proto.CompactTextString(m) } func (*Tag) ProtoMessage() {} func (*Tag) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{2} + return fileDescriptor_office_1d2fa21c23f88044, []int{2} } func (m *Tag) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Tag.Unmarshal(m, b) @@ -182,7 +182,7 @@ func (m *GetUserTagsReq) Reset() { *m = GetUserTagsReq{} } func (m *GetUserTagsReq) String() string { return proto.CompactTextString(m) } func (*GetUserTagsReq) ProtoMessage() {} func (*GetUserTagsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{3} + return fileDescriptor_office_1d2fa21c23f88044, []int{3} } func (m *GetUserTagsReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserTagsReq.Unmarshal(m, b) @@ -228,7 +228,7 @@ func (m *GetUserTagsResp) Reset() { *m = GetUserTagsResp{} } func (m *GetUserTagsResp) String() string { return proto.CompactTextString(m) } func (*GetUserTagsResp) ProtoMessage() {} func (*GetUserTagsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{4} + return fileDescriptor_office_1d2fa21c23f88044, []int{4} } func (m *GetUserTagsResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserTagsResp.Unmarshal(m, b) @@ -276,7 +276,7 @@ func (m *CreateTagReq) Reset() { *m = CreateTagReq{} } func (m *CreateTagReq) String() string { return proto.CompactTextString(m) } func (*CreateTagReq) ProtoMessage() {} func (*CreateTagReq) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{5} + return fileDescriptor_office_1d2fa21c23f88044, []int{5} } func (m *CreateTagReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateTagReq.Unmarshal(m, b) @@ -335,7 +335,7 @@ func (m *CreateTagResp) Reset() { *m = CreateTagResp{} } func (m *CreateTagResp) String() string { return proto.CompactTextString(m) } func (*CreateTagResp) ProtoMessage() {} func (*CreateTagResp) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{6} + return fileDescriptor_office_1d2fa21c23f88044, []int{6} } func (m *CreateTagResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateTagResp.Unmarshal(m, b) @@ -375,7 +375,7 @@ func (m *DeleteTagReq) Reset() { *m = DeleteTagReq{} } func (m *DeleteTagReq) String() string { return proto.CompactTextString(m) } func (*DeleteTagReq) ProtoMessage() {} func (*DeleteTagReq) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{7} + return fileDescriptor_office_1d2fa21c23f88044, []int{7} } func (m *DeleteTagReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteTagReq.Unmarshal(m, b) @@ -427,7 +427,7 @@ func (m *DeleteTagResp) Reset() { *m = DeleteTagResp{} } func (m *DeleteTagResp) String() string { return proto.CompactTextString(m) } func (*DeleteTagResp) ProtoMessage() {} func (*DeleteTagResp) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{8} + return fileDescriptor_office_1d2fa21c23f88044, []int{8} } func (m *DeleteTagResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteTagResp.Unmarshal(m, b) @@ -470,7 +470,7 @@ func (m *SetTagReq) Reset() { *m = SetTagReq{} } func (m *SetTagReq) String() string { return proto.CompactTextString(m) } func (*SetTagReq) ProtoMessage() {} func (*SetTagReq) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{9} + return fileDescriptor_office_1d2fa21c23f88044, []int{9} } func (m *SetTagReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetTagReq.Unmarshal(m, b) @@ -543,7 +543,7 @@ func (m *SetTagResp) Reset() { *m = SetTagResp{} } func (m *SetTagResp) String() string { return proto.CompactTextString(m) } func (*SetTagResp) ProtoMessage() {} func (*SetTagResp) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{10} + return fileDescriptor_office_1d2fa21c23f88044, []int{10} } func (m *SetTagResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetTagResp.Unmarshal(m, b) @@ -587,7 +587,7 @@ func (m *SendMsg2TagReq) Reset() { *m = SendMsg2TagReq{} } func (m *SendMsg2TagReq) String() string { return proto.CompactTextString(m) } func (*SendMsg2TagReq) ProtoMessage() {} func (*SendMsg2TagReq) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{11} + return fileDescriptor_office_1d2fa21c23f88044, []int{11} } func (m *SendMsg2TagReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SendMsg2TagReq.Unmarshal(m, b) @@ -667,7 +667,7 @@ func (m *SendMsg2TagResp) Reset() { *m = SendMsg2TagResp{} } func (m *SendMsg2TagResp) String() string { return proto.CompactTextString(m) } func (*SendMsg2TagResp) ProtoMessage() {} func (*SendMsg2TagResp) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{12} + return fileDescriptor_office_1d2fa21c23f88044, []int{12} } func (m *SendMsg2TagResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SendMsg2TagResp.Unmarshal(m, b) @@ -707,7 +707,7 @@ func (m *GetTagSendLogsReq) Reset() { *m = GetTagSendLogsReq{} } func (m *GetTagSendLogsReq) String() string { return proto.CompactTextString(m) } func (*GetTagSendLogsReq) ProtoMessage() {} func (*GetTagSendLogsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{13} + return fileDescriptor_office_1d2fa21c23f88044, []int{13} } func (m *GetTagSendLogsReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetTagSendLogsReq.Unmarshal(m, b) @@ -761,7 +761,7 @@ func (m *TagSendLog) Reset() { *m = TagSendLog{} } func (m *TagSendLog) String() string { return proto.CompactTextString(m) } func (*TagSendLog) ProtoMessage() {} func (*TagSendLog) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{14} + return fileDescriptor_office_1d2fa21c23f88044, []int{14} } func (m *TagSendLog) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_TagSendLog.Unmarshal(m, b) @@ -815,7 +815,7 @@ func (m *GetTagSendLogsResp) Reset() { *m = GetTagSendLogsResp{} } func (m *GetTagSendLogsResp) String() string { return proto.CompactTextString(m) } func (*GetTagSendLogsResp) ProtoMessage() {} func (*GetTagSendLogsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{15} + return fileDescriptor_office_1d2fa21c23f88044, []int{15} } func (m *GetTagSendLogsResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetTagSendLogsResp.Unmarshal(m, b) @@ -869,7 +869,7 @@ func (m *GetUserTagByIDReq) Reset() { *m = GetUserTagByIDReq{} } func (m *GetUserTagByIDReq) String() string { return proto.CompactTextString(m) } func (*GetUserTagByIDReq) ProtoMessage() {} func (*GetUserTagByIDReq) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{16} + return fileDescriptor_office_1d2fa21c23f88044, []int{16} } func (m *GetUserTagByIDReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserTagByIDReq.Unmarshal(m, b) @@ -922,7 +922,7 @@ func (m *GetUserTagByIDResp) Reset() { *m = GetUserTagByIDResp{} } func (m *GetUserTagByIDResp) String() string { return proto.CompactTextString(m) } func (*GetUserTagByIDResp) ProtoMessage() {} func (*GetUserTagByIDResp) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{17} + return fileDescriptor_office_1d2fa21c23f88044, []int{17} } func (m *GetUserTagByIDResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserTagByIDResp.Unmarshal(m, b) @@ -968,7 +968,7 @@ func (m *LikeUser) Reset() { *m = LikeUser{} } func (m *LikeUser) String() string { return proto.CompactTextString(m) } func (*LikeUser) ProtoMessage() {} func (*LikeUser) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{18} + return fileDescriptor_office_1d2fa21c23f88044, []int{18} } func (m *LikeUser) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LikeUser.Unmarshal(m, b) @@ -1002,14 +1002,61 @@ func (m *LikeUser) GetUserName() string { return "" } +type NotificationUser struct { + UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` + UserName string `protobuf:"bytes,2,opt,name=userName" json:"userName,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NotificationUser) Reset() { *m = NotificationUser{} } +func (m *NotificationUser) String() string { return proto.CompactTextString(m) } +func (*NotificationUser) ProtoMessage() {} +func (*NotificationUser) Descriptor() ([]byte, []int) { + return fileDescriptor_office_1d2fa21c23f88044, []int{19} +} +func (m *NotificationUser) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_NotificationUser.Unmarshal(m, b) +} +func (m *NotificationUser) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_NotificationUser.Marshal(b, m, deterministic) +} +func (dst *NotificationUser) XXX_Merge(src proto.Message) { + xxx_messageInfo_NotificationUser.Merge(dst, src) +} +func (m *NotificationUser) XXX_Size() int { + return xxx_messageInfo_NotificationUser.Size(m) +} +func (m *NotificationUser) XXX_DiscardUnknown() { + xxx_messageInfo_NotificationUser.DiscardUnknown(m) +} + +var xxx_messageInfo_NotificationUser proto.InternalMessageInfo + +func (m *NotificationUser) GetUserID() string { + if m != nil { + return m.UserID + } + return "" +} + +func (m *NotificationUser) GetUserName() string { + if m != nil { + return m.UserName + } + return "" +} + type Comment struct { UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` UserName string `protobuf:"bytes,2,opt,name=userName" json:"userName,omitempty"` - ReplyUserID string `protobuf:"bytes,3,opt,name=replyUserID" json:"replyUserID,omitempty"` - ReplyUserName string `protobuf:"bytes,4,opt,name=replyUserName" json:"replyUserName,omitempty"` - ContentID string `protobuf:"bytes,5,opt,name=contentID" json:"contentID,omitempty"` - Content string `protobuf:"bytes,6,opt,name=content" json:"content,omitempty"` - CreateTime int32 `protobuf:"varint,7,opt,name=createTime" json:"createTime,omitempty"` + FaceURL string `protobuf:"bytes,3,opt,name=faceURL" json:"faceURL,omitempty"` + ReplyUserID string `protobuf:"bytes,4,opt,name=replyUserID" json:"replyUserID,omitempty"` + ReplyUserName string `protobuf:"bytes,5,opt,name=replyUserName" json:"replyUserName,omitempty"` + ContentID string `protobuf:"bytes,6,opt,name=contentID" json:"contentID,omitempty"` + Content string `protobuf:"bytes,7,opt,name=content" json:"content,omitempty"` + CreateTime int32 `protobuf:"varint,8,opt,name=createTime" json:"createTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -1019,7 +1066,7 @@ func (m *Comment) Reset() { *m = Comment{} } func (m *Comment) String() string { return proto.CompactTextString(m) } func (*Comment) ProtoMessage() {} func (*Comment) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{19} + return fileDescriptor_office_1d2fa21c23f88044, []int{20} } func (m *Comment) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Comment.Unmarshal(m, b) @@ -1053,6 +1100,13 @@ func (m *Comment) GetUserName() string { return "" } +func (m *Comment) GetFaceURL() string { + if m != nil { + return m.FaceURL + } + return "" +} + func (m *Comment) GetReplyUserID() string { if m != nil { return m.ReplyUserID @@ -1089,25 +1143,28 @@ func (m *Comment) GetCreateTime() int32 { } type WorkMoment struct { - WorkMomentID string `protobuf:"bytes,1,opt,name=workMomentID" json:"workMomentID,omitempty"` - UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` - Content string `protobuf:"bytes,3,opt,name=content" json:"content,omitempty"` - LikeUsers []*LikeUser `protobuf:"bytes,4,rep,name=likeUsers" json:"likeUsers,omitempty"` - Comments []*Comment `protobuf:"bytes,5,rep,name=comments" json:"comments,omitempty"` - WhoCanSeeUserIDList []string `protobuf:"bytes,6,rep,name=whoCanSeeUserIDList" json:"whoCanSeeUserIDList,omitempty"` - WhoCantSeeUserIDList []string `protobuf:"bytes,7,rep,name=whoCantSeeUserIDList" json:"whoCantSeeUserIDList,omitempty"` - IsPrivate bool `protobuf:"varint,8,opt,name=isPrivate" json:"isPrivate,omitempty"` - CreateTime int32 `protobuf:"varint,10,opt,name=CreateTime" json:"CreateTime,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + WorkMomentID string `protobuf:"bytes,1,opt,name=workMomentID" json:"workMomentID,omitempty"` + UserID string `protobuf:"bytes,2,opt,name=userID" json:"userID,omitempty"` + UserName string `protobuf:"bytes,3,opt,name=userName" json:"userName,omitempty"` + FaceURL string `protobuf:"bytes,4,opt,name=faceURL" json:"faceURL,omitempty"` + Content string `protobuf:"bytes,5,opt,name=content" json:"content,omitempty"` + LikeUsers []*LikeUser `protobuf:"bytes,6,rep,name=likeUsers" json:"likeUsers,omitempty"` + Comments []*Comment `protobuf:"bytes,7,rep,name=comments" json:"comments,omitempty"` + Permission int32 `protobuf:"varint,8,opt,name=permission" json:"permission,omitempty"` + PermissionUserIDList []string `protobuf:"bytes,9,rep,name=permissionUserIDList" json:"permissionUserIDList,omitempty"` + PermissionGroupIDList []string `protobuf:"bytes,10,rep,name=permissionGroupIDList" json:"permissionGroupIDList,omitempty"` + AtUserIDList []string `protobuf:"bytes,11,rep,name=atUserIDList" json:"atUserIDList,omitempty"` + CreateTime int32 `protobuf:"varint,12,opt,name=createTime" json:"createTime,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *WorkMoment) Reset() { *m = WorkMoment{} } func (m *WorkMoment) String() string { return proto.CompactTextString(m) } func (*WorkMoment) ProtoMessage() {} func (*WorkMoment) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{20} + return fileDescriptor_office_1d2fa21c23f88044, []int{21} } func (m *WorkMoment) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_WorkMoment.Unmarshal(m, b) @@ -1141,6 +1198,20 @@ func (m *WorkMoment) GetUserID() string { return "" } +func (m *WorkMoment) GetUserName() string { + if m != nil { + return m.UserName + } + return "" +} + +func (m *WorkMoment) GetFaceURL() string { + if m != nil { + return m.FaceURL + } + return "" +} + func (m *WorkMoment) GetContent() string { if m != nil { return m.Content @@ -1162,25 +1233,32 @@ func (m *WorkMoment) GetComments() []*Comment { return nil } -func (m *WorkMoment) GetWhoCanSeeUserIDList() []string { +func (m *WorkMoment) GetPermission() int32 { if m != nil { - return m.WhoCanSeeUserIDList + return m.Permission + } + return 0 +} + +func (m *WorkMoment) GetPermissionUserIDList() []string { + if m != nil { + return m.PermissionUserIDList } return nil } -func (m *WorkMoment) GetWhoCantSeeUserIDList() []string { +func (m *WorkMoment) GetPermissionGroupIDList() []string { if m != nil { - return m.WhoCantSeeUserIDList + return m.PermissionGroupIDList } return nil } -func (m *WorkMoment) GetIsPrivate() bool { +func (m *WorkMoment) GetAtUserIDList() []string { if m != nil { - return m.IsPrivate + return m.AtUserIDList } - return false + return nil } func (m *WorkMoment) GetCreateTime() int32 { @@ -1202,7 +1280,7 @@ func (m *CreateOneWorkMomentReq) Reset() { *m = CreateOneWorkMomentReq{} func (m *CreateOneWorkMomentReq) String() string { return proto.CompactTextString(m) } func (*CreateOneWorkMomentReq) ProtoMessage() {} func (*CreateOneWorkMomentReq) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{21} + return fileDescriptor_office_1d2fa21c23f88044, []int{22} } func (m *CreateOneWorkMomentReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateOneWorkMomentReq.Unmarshal(m, b) @@ -1247,7 +1325,7 @@ func (m *CreateOneWorkMomentResp) Reset() { *m = CreateOneWorkMomentResp func (m *CreateOneWorkMomentResp) String() string { return proto.CompactTextString(m) } func (*CreateOneWorkMomentResp) ProtoMessage() {} func (*CreateOneWorkMomentResp) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{22} + return fileDescriptor_office_1d2fa21c23f88044, []int{23} } func (m *CreateOneWorkMomentResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CreateOneWorkMomentResp.Unmarshal(m, b) @@ -1287,7 +1365,7 @@ func (m *DeleteOneWorkMomentReq) Reset() { *m = DeleteOneWorkMomentReq{} func (m *DeleteOneWorkMomentReq) String() string { return proto.CompactTextString(m) } func (*DeleteOneWorkMomentReq) ProtoMessage() {} func (*DeleteOneWorkMomentReq) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{23} + return fileDescriptor_office_1d2fa21c23f88044, []int{24} } func (m *DeleteOneWorkMomentReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteOneWorkMomentReq.Unmarshal(m, b) @@ -1339,7 +1417,7 @@ func (m *DeleteOneWorkMomentResp) Reset() { *m = DeleteOneWorkMomentResp func (m *DeleteOneWorkMomentResp) String() string { return proto.CompactTextString(m) } func (*DeleteOneWorkMomentResp) ProtoMessage() {} func (*DeleteOneWorkMomentResp) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{24} + return fileDescriptor_office_1d2fa21c23f88044, []int{25} } func (m *DeleteOneWorkMomentResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteOneWorkMomentResp.Unmarshal(m, b) @@ -1379,7 +1457,7 @@ func (m *LikeOneWorkMomentReq) Reset() { *m = LikeOneWorkMomentReq{} } func (m *LikeOneWorkMomentReq) String() string { return proto.CompactTextString(m) } func (*LikeOneWorkMomentReq) ProtoMessage() {} func (*LikeOneWorkMomentReq) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{25} + return fileDescriptor_office_1d2fa21c23f88044, []int{26} } func (m *LikeOneWorkMomentReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LikeOneWorkMomentReq.Unmarshal(m, b) @@ -1431,7 +1509,7 @@ func (m *LikeOneWorkMomentResp) Reset() { *m = LikeOneWorkMomentResp{} } func (m *LikeOneWorkMomentResp) String() string { return proto.CompactTextString(m) } func (*LikeOneWorkMomentResp) ProtoMessage() {} func (*LikeOneWorkMomentResp) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{26} + return fileDescriptor_office_1d2fa21c23f88044, []int{27} } func (m *LikeOneWorkMomentResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LikeOneWorkMomentResp.Unmarshal(m, b) @@ -1473,7 +1551,7 @@ func (m *CommentOneWorkMomentReq) Reset() { *m = CommentOneWorkMomentReq func (m *CommentOneWorkMomentReq) String() string { return proto.CompactTextString(m) } func (*CommentOneWorkMomentReq) ProtoMessage() {} func (*CommentOneWorkMomentReq) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{27} + return fileDescriptor_office_1d2fa21c23f88044, []int{28} } func (m *CommentOneWorkMomentReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommentOneWorkMomentReq.Unmarshal(m, b) @@ -1539,7 +1617,7 @@ func (m *CommentOneWorkMomentResp) Reset() { *m = CommentOneWorkMomentRe func (m *CommentOneWorkMomentResp) String() string { return proto.CompactTextString(m) } func (*CommentOneWorkMomentResp) ProtoMessage() {} func (*CommentOneWorkMomentResp) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{28} + return fileDescriptor_office_1d2fa21c23f88044, []int{29} } func (m *CommentOneWorkMomentResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommentOneWorkMomentResp.Unmarshal(m, b) @@ -1579,7 +1657,7 @@ func (m *GetWorkMomentByIDReq) Reset() { *m = GetWorkMomentByIDReq{} } func (m *GetWorkMomentByIDReq) String() string { return proto.CompactTextString(m) } func (*GetWorkMomentByIDReq) ProtoMessage() {} func (*GetWorkMomentByIDReq) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{29} + return fileDescriptor_office_1d2fa21c23f88044, []int{30} } func (m *GetWorkMomentByIDReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetWorkMomentByIDReq.Unmarshal(m, b) @@ -1632,7 +1710,7 @@ func (m *GetWorkMomentByIDResp) Reset() { *m = GetWorkMomentByIDResp{} } func (m *GetWorkMomentByIDResp) String() string { return proto.CompactTextString(m) } func (*GetWorkMomentByIDResp) ProtoMessage() {} func (*GetWorkMomentByIDResp) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{30} + return fileDescriptor_office_1d2fa21c23f88044, []int{31} } func (m *GetWorkMomentByIDResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetWorkMomentByIDResp.Unmarshal(m, b) @@ -1666,6 +1744,114 @@ func (m *GetWorkMomentByIDResp) GetWorkMoment() *WorkMoment { return nil } +type ChangeWorkMomentPermissionReq struct { + WorkMomentID string `protobuf:"bytes,1,opt,name=workMomentID" json:"workMomentID,omitempty"` + OpUserID string `protobuf:"bytes,2,opt,name=opUserID" json:"opUserID,omitempty"` + Permission int32 `protobuf:"varint,3,opt,name=permission" json:"permission,omitempty"` + PermissionUserIDList []string `protobuf:"bytes,4,rep,name=permissionUserIDList" json:"permissionUserIDList,omitempty"` + OperationID string `protobuf:"bytes,5,opt,name=operationID" json:"operationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ChangeWorkMomentPermissionReq) Reset() { *m = ChangeWorkMomentPermissionReq{} } +func (m *ChangeWorkMomentPermissionReq) String() string { return proto.CompactTextString(m) } +func (*ChangeWorkMomentPermissionReq) ProtoMessage() {} +func (*ChangeWorkMomentPermissionReq) Descriptor() ([]byte, []int) { + return fileDescriptor_office_1d2fa21c23f88044, []int{32} +} +func (m *ChangeWorkMomentPermissionReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ChangeWorkMomentPermissionReq.Unmarshal(m, b) +} +func (m *ChangeWorkMomentPermissionReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ChangeWorkMomentPermissionReq.Marshal(b, m, deterministic) +} +func (dst *ChangeWorkMomentPermissionReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChangeWorkMomentPermissionReq.Merge(dst, src) +} +func (m *ChangeWorkMomentPermissionReq) XXX_Size() int { + return xxx_messageInfo_ChangeWorkMomentPermissionReq.Size(m) +} +func (m *ChangeWorkMomentPermissionReq) XXX_DiscardUnknown() { + xxx_messageInfo_ChangeWorkMomentPermissionReq.DiscardUnknown(m) +} + +var xxx_messageInfo_ChangeWorkMomentPermissionReq proto.InternalMessageInfo + +func (m *ChangeWorkMomentPermissionReq) GetWorkMomentID() string { + if m != nil { + return m.WorkMomentID + } + return "" +} + +func (m *ChangeWorkMomentPermissionReq) GetOpUserID() string { + if m != nil { + return m.OpUserID + } + return "" +} + +func (m *ChangeWorkMomentPermissionReq) GetPermission() int32 { + if m != nil { + return m.Permission + } + return 0 +} + +func (m *ChangeWorkMomentPermissionReq) GetPermissionUserIDList() []string { + if m != nil { + return m.PermissionUserIDList + } + return nil +} + +func (m *ChangeWorkMomentPermissionReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type ChangeWorkMomentPermissionResp struct { + CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ChangeWorkMomentPermissionResp) Reset() { *m = ChangeWorkMomentPermissionResp{} } +func (m *ChangeWorkMomentPermissionResp) String() string { return proto.CompactTextString(m) } +func (*ChangeWorkMomentPermissionResp) ProtoMessage() {} +func (*ChangeWorkMomentPermissionResp) Descriptor() ([]byte, []int) { + return fileDescriptor_office_1d2fa21c23f88044, []int{33} +} +func (m *ChangeWorkMomentPermissionResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ChangeWorkMomentPermissionResp.Unmarshal(m, b) +} +func (m *ChangeWorkMomentPermissionResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ChangeWorkMomentPermissionResp.Marshal(b, m, deterministic) +} +func (dst *ChangeWorkMomentPermissionResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChangeWorkMomentPermissionResp.Merge(dst, src) +} +func (m *ChangeWorkMomentPermissionResp) XXX_Size() int { + return xxx_messageInfo_ChangeWorkMomentPermissionResp.Size(m) +} +func (m *ChangeWorkMomentPermissionResp) XXX_DiscardUnknown() { + xxx_messageInfo_ChangeWorkMomentPermissionResp.DiscardUnknown(m) +} + +var xxx_messageInfo_ChangeWorkMomentPermissionResp proto.InternalMessageInfo + +func (m *ChangeWorkMomentPermissionResp) GetCommonResp() *CommonResp { + if m != nil { + return m.CommonResp + } + return nil +} + type GetUserWorkMomentsReq struct { UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` Pagination *sdk_ws.RequestPagination `protobuf:"bytes,2,opt,name=Pagination" json:"Pagination,omitempty"` @@ -1679,7 +1865,7 @@ func (m *GetUserWorkMomentsReq) Reset() { *m = GetUserWorkMomentsReq{} } func (m *GetUserWorkMomentsReq) String() string { return proto.CompactTextString(m) } func (*GetUserWorkMomentsReq) ProtoMessage() {} func (*GetUserWorkMomentsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{31} + return fileDescriptor_office_1d2fa21c23f88044, []int{34} } func (m *GetUserWorkMomentsReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserWorkMomentsReq.Unmarshal(m, b) @@ -1733,7 +1919,7 @@ func (m *GetUserWorkMomentsResp) Reset() { *m = GetUserWorkMomentsResp{} func (m *GetUserWorkMomentsResp) String() string { return proto.CompactTextString(m) } func (*GetUserWorkMomentsResp) ProtoMessage() {} func (*GetUserWorkMomentsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{32} + return fileDescriptor_office_1d2fa21c23f88044, []int{35} } func (m *GetUserWorkMomentsResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserWorkMomentsResp.Unmarshal(m, b) @@ -1787,7 +1973,7 @@ func (m *GetUserFriendWorkMomentsReq) Reset() { *m = GetUserFriendWorkMo func (m *GetUserFriendWorkMomentsReq) String() string { return proto.CompactTextString(m) } func (*GetUserFriendWorkMomentsReq) ProtoMessage() {} func (*GetUserFriendWorkMomentsReq) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{33} + return fileDescriptor_office_1d2fa21c23f88044, []int{36} } func (m *GetUserFriendWorkMomentsReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserFriendWorkMomentsReq.Unmarshal(m, b) @@ -1841,7 +2027,7 @@ func (m *GetUserFriendWorkMomentsResp) Reset() { *m = GetUserFriendWorkM func (m *GetUserFriendWorkMomentsResp) String() string { return proto.CompactTextString(m) } func (*GetUserFriendWorkMomentsResp) ProtoMessage() {} func (*GetUserFriendWorkMomentsResp) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{34} + return fileDescriptor_office_1d2fa21c23f88044, []int{37} } func (m *GetUserFriendWorkMomentsResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserFriendWorkMomentsResp.Unmarshal(m, b) @@ -1882,260 +2068,92 @@ func (m *GetUserFriendWorkMomentsResp) GetPagination() *sdk_ws.ResponsePaginatio return nil } -type CommentsMsg struct { - Comment *Comment `protobuf:"bytes,1,opt,name=comment" json:"comment,omitempty"` - WorkMomentID string `protobuf:"bytes,2,opt,name=workMomentID" json:"workMomentID,omitempty"` - UserID string `protobuf:"bytes,3,opt,name=userID" json:"userID,omitempty"` - Content string `protobuf:"bytes,4,opt,name=content" json:"content,omitempty"` +type WorkMomentNotificationMsg struct { + NotificationMsgType int32 `protobuf:"varint,1,opt,name=notificationMsgType" json:"notificationMsgType,omitempty"` + Comment *Comment `protobuf:"bytes,2,opt,name=comment" json:"comment,omitempty"` + WorkMomentID string `protobuf:"bytes,3,opt,name=workMomentID" json:"workMomentID,omitempty"` + UserID string `protobuf:"bytes,4,opt,name=userID" json:"userID,omitempty"` + UserName string `protobuf:"bytes,5,opt,name=userName" json:"userName,omitempty"` + FaceURL string `protobuf:"bytes,6,opt,name=faceURL" json:"faceURL,omitempty"` + WorkMomentContent string `protobuf:"bytes,7,opt,name=workMomentContent" json:"workMomentContent,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` } -func (m *CommentsMsg) Reset() { *m = CommentsMsg{} } -func (m *CommentsMsg) String() string { return proto.CompactTextString(m) } -func (*CommentsMsg) ProtoMessage() {} -func (*CommentsMsg) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{35} +func (m *WorkMomentNotificationMsg) Reset() { *m = WorkMomentNotificationMsg{} } +func (m *WorkMomentNotificationMsg) String() string { return proto.CompactTextString(m) } +func (*WorkMomentNotificationMsg) ProtoMessage() {} +func (*WorkMomentNotificationMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_office_1d2fa21c23f88044, []int{38} } -func (m *CommentsMsg) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CommentsMsg.Unmarshal(m, b) +func (m *WorkMomentNotificationMsg) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_WorkMomentNotificationMsg.Unmarshal(m, b) } -func (m *CommentsMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CommentsMsg.Marshal(b, m, deterministic) +func (m *WorkMomentNotificationMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_WorkMomentNotificationMsg.Marshal(b, m, deterministic) } -func (dst *CommentsMsg) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommentsMsg.Merge(dst, src) +func (dst *WorkMomentNotificationMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_WorkMomentNotificationMsg.Merge(dst, src) } -func (m *CommentsMsg) XXX_Size() int { - return xxx_messageInfo_CommentsMsg.Size(m) +func (m *WorkMomentNotificationMsg) XXX_Size() int { + return xxx_messageInfo_WorkMomentNotificationMsg.Size(m) } -func (m *CommentsMsg) XXX_DiscardUnknown() { - xxx_messageInfo_CommentsMsg.DiscardUnknown(m) +func (m *WorkMomentNotificationMsg) XXX_DiscardUnknown() { + xxx_messageInfo_WorkMomentNotificationMsg.DiscardUnknown(m) } -var xxx_messageInfo_CommentsMsg proto.InternalMessageInfo +var xxx_messageInfo_WorkMomentNotificationMsg proto.InternalMessageInfo -func (m *CommentsMsg) GetComment() *Comment { +func (m *WorkMomentNotificationMsg) GetNotificationMsgType() int32 { if m != nil { - return m.Comment + return m.NotificationMsgType } - return nil + return 0 } -func (m *CommentsMsg) GetWorkMomentID() string { +func (m *WorkMomentNotificationMsg) GetComment() *Comment { if m != nil { - return m.WorkMomentID + return m.Comment } - return "" + return nil } -func (m *CommentsMsg) GetUserID() string { +func (m *WorkMomentNotificationMsg) GetWorkMomentID() string { if m != nil { - return m.UserID + return m.WorkMomentID } return "" } -func (m *CommentsMsg) GetContent() string { - if m != nil { - return m.Content - } - return "" -} - -type GetUserWorkMomentsCommentsMsgReq struct { - UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` - Pagination *sdk_ws.RequestPagination `protobuf:"bytes,3,opt,name=Pagination" json:"Pagination,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetUserWorkMomentsCommentsMsgReq) Reset() { *m = GetUserWorkMomentsCommentsMsgReq{} } -func (m *GetUserWorkMomentsCommentsMsgReq) String() string { return proto.CompactTextString(m) } -func (*GetUserWorkMomentsCommentsMsgReq) ProtoMessage() {} -func (*GetUserWorkMomentsCommentsMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{36} -} -func (m *GetUserWorkMomentsCommentsMsgReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetUserWorkMomentsCommentsMsgReq.Unmarshal(m, b) -} -func (m *GetUserWorkMomentsCommentsMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetUserWorkMomentsCommentsMsgReq.Marshal(b, m, deterministic) -} -func (dst *GetUserWorkMomentsCommentsMsgReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetUserWorkMomentsCommentsMsgReq.Merge(dst, src) -} -func (m *GetUserWorkMomentsCommentsMsgReq) XXX_Size() int { - return xxx_messageInfo_GetUserWorkMomentsCommentsMsgReq.Size(m) -} -func (m *GetUserWorkMomentsCommentsMsgReq) XXX_DiscardUnknown() { - xxx_messageInfo_GetUserWorkMomentsCommentsMsgReq.DiscardUnknown(m) -} - -var xxx_messageInfo_GetUserWorkMomentsCommentsMsgReq proto.InternalMessageInfo - -func (m *GetUserWorkMomentsCommentsMsgReq) GetUserID() string { +func (m *WorkMomentNotificationMsg) GetUserID() string { if m != nil { return m.UserID } return "" } -func (m *GetUserWorkMomentsCommentsMsgReq) GetOperationID() string { +func (m *WorkMomentNotificationMsg) GetUserName() string { if m != nil { - return m.OperationID + return m.UserName } return "" } -func (m *GetUserWorkMomentsCommentsMsgReq) GetPagination() *sdk_ws.RequestPagination { - if m != nil { - return m.Pagination - } - return nil -} - -type GetUserWorkMomentsCommentsMsgResp struct { - CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - CommentsMsgs []*CommentsMsg `protobuf:"bytes,2,rep,name=commentsMsgs" json:"commentsMsgs,omitempty"` - Pagination *sdk_ws.ResponsePagination `protobuf:"bytes,3,opt,name=Pagination" json:"Pagination,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetUserWorkMomentsCommentsMsgResp) Reset() { *m = GetUserWorkMomentsCommentsMsgResp{} } -func (m *GetUserWorkMomentsCommentsMsgResp) String() string { return proto.CompactTextString(m) } -func (*GetUserWorkMomentsCommentsMsgResp) ProtoMessage() {} -func (*GetUserWorkMomentsCommentsMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{37} -} -func (m *GetUserWorkMomentsCommentsMsgResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetUserWorkMomentsCommentsMsgResp.Unmarshal(m, b) -} -func (m *GetUserWorkMomentsCommentsMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetUserWorkMomentsCommentsMsgResp.Marshal(b, m, deterministic) -} -func (dst *GetUserWorkMomentsCommentsMsgResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetUserWorkMomentsCommentsMsgResp.Merge(dst, src) -} -func (m *GetUserWorkMomentsCommentsMsgResp) XXX_Size() int { - return xxx_messageInfo_GetUserWorkMomentsCommentsMsgResp.Size(m) -} -func (m *GetUserWorkMomentsCommentsMsgResp) XXX_DiscardUnknown() { - xxx_messageInfo_GetUserWorkMomentsCommentsMsgResp.DiscardUnknown(m) -} - -var xxx_messageInfo_GetUserWorkMomentsCommentsMsgResp proto.InternalMessageInfo - -func (m *GetUserWorkMomentsCommentsMsgResp) GetCommonResp() *CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - -func (m *GetUserWorkMomentsCommentsMsgResp) GetCommentsMsgs() []*CommentsMsg { +func (m *WorkMomentNotificationMsg) GetFaceURL() string { if m != nil { - return m.CommentsMsgs - } - return nil -} - -func (m *GetUserWorkMomentsCommentsMsgResp) GetPagination() *sdk_ws.ResponsePagination { - if m != nil { - return m.Pagination - } - return nil -} - -type ClearUserWorkMomentsCommentsMsgReq struct { - UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` - OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ClearUserWorkMomentsCommentsMsgReq) Reset() { *m = ClearUserWorkMomentsCommentsMsgReq{} } -func (m *ClearUserWorkMomentsCommentsMsgReq) String() string { return proto.CompactTextString(m) } -func (*ClearUserWorkMomentsCommentsMsgReq) ProtoMessage() {} -func (*ClearUserWorkMomentsCommentsMsgReq) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{38} -} -func (m *ClearUserWorkMomentsCommentsMsgReq) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ClearUserWorkMomentsCommentsMsgReq.Unmarshal(m, b) -} -func (m *ClearUserWorkMomentsCommentsMsgReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ClearUserWorkMomentsCommentsMsgReq.Marshal(b, m, deterministic) -} -func (dst *ClearUserWorkMomentsCommentsMsgReq) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClearUserWorkMomentsCommentsMsgReq.Merge(dst, src) -} -func (m *ClearUserWorkMomentsCommentsMsgReq) XXX_Size() int { - return xxx_messageInfo_ClearUserWorkMomentsCommentsMsgReq.Size(m) -} -func (m *ClearUserWorkMomentsCommentsMsgReq) XXX_DiscardUnknown() { - xxx_messageInfo_ClearUserWorkMomentsCommentsMsgReq.DiscardUnknown(m) -} - -var xxx_messageInfo_ClearUserWorkMomentsCommentsMsgReq proto.InternalMessageInfo - -func (m *ClearUserWorkMomentsCommentsMsgReq) GetUserID() string { - if m != nil { - return m.UserID + return m.FaceURL } return "" } -func (m *ClearUserWorkMomentsCommentsMsgReq) GetOperationID() string { +func (m *WorkMomentNotificationMsg) GetWorkMomentContent() string { if m != nil { - return m.OperationID + return m.WorkMomentContent } return "" } -type ClearUserWorkMomentsCommentsMsgResp struct { - CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ClearUserWorkMomentsCommentsMsgResp) Reset() { *m = ClearUserWorkMomentsCommentsMsgResp{} } -func (m *ClearUserWorkMomentsCommentsMsgResp) String() string { return proto.CompactTextString(m) } -func (*ClearUserWorkMomentsCommentsMsgResp) ProtoMessage() {} -func (*ClearUserWorkMomentsCommentsMsgResp) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{39} -} -func (m *ClearUserWorkMomentsCommentsMsgResp) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ClearUserWorkMomentsCommentsMsgResp.Unmarshal(m, b) -} -func (m *ClearUserWorkMomentsCommentsMsgResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ClearUserWorkMomentsCommentsMsgResp.Marshal(b, m, deterministic) -} -func (dst *ClearUserWorkMomentsCommentsMsgResp) XXX_Merge(src proto.Message) { - xxx_messageInfo_ClearUserWorkMomentsCommentsMsgResp.Merge(dst, src) -} -func (m *ClearUserWorkMomentsCommentsMsgResp) XXX_Size() int { - return xxx_messageInfo_ClearUserWorkMomentsCommentsMsgResp.Size(m) -} -func (m *ClearUserWorkMomentsCommentsMsgResp) XXX_DiscardUnknown() { - xxx_messageInfo_ClearUserWorkMomentsCommentsMsgResp.DiscardUnknown(m) -} - -var xxx_messageInfo_ClearUserWorkMomentsCommentsMsgResp proto.InternalMessageInfo - -func (m *ClearUserWorkMomentsCommentsMsgResp) GetCommonResp() *CommonResp { - if m != nil { - return m.CommonResp - } - return nil -} - type SetUserWorkMomentsLevelReq struct { UserID string `protobuf:"bytes,1,opt,name=userID" json:"userID,omitempty"` Level int32 `protobuf:"varint,2,opt,name=level" json:"level,omitempty"` @@ -2149,7 +2167,7 @@ func (m *SetUserWorkMomentsLevelReq) Reset() { *m = SetUserWorkMomentsLe func (m *SetUserWorkMomentsLevelReq) String() string { return proto.CompactTextString(m) } func (*SetUserWorkMomentsLevelReq) ProtoMessage() {} func (*SetUserWorkMomentsLevelReq) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{40} + return fileDescriptor_office_1d2fa21c23f88044, []int{39} } func (m *SetUserWorkMomentsLevelReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetUserWorkMomentsLevelReq.Unmarshal(m, b) @@ -2201,7 +2219,7 @@ func (m *SetUserWorkMomentsLevelResp) Reset() { *m = SetUserWorkMomentsL func (m *SetUserWorkMomentsLevelResp) String() string { return proto.CompactTextString(m) } func (*SetUserWorkMomentsLevelResp) ProtoMessage() {} func (*SetUserWorkMomentsLevelResp) Descriptor() ([]byte, []int) { - return fileDescriptor_office_282f0d3c571a3eb6, []int{41} + return fileDescriptor_office_1d2fa21c23f88044, []int{40} } func (m *SetUserWorkMomentsLevelResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetUserWorkMomentsLevelResp.Unmarshal(m, b) @@ -2248,6 +2266,7 @@ func init() { proto.RegisterType((*GetUserTagByIDReq)(nil), "office.GetUserTagByIDReq") proto.RegisterType((*GetUserTagByIDResp)(nil), "office.GetUserTagByIDResp") proto.RegisterType((*LikeUser)(nil), "office.LikeUser") + proto.RegisterType((*NotificationUser)(nil), "office.NotificationUser") proto.RegisterType((*Comment)(nil), "office.Comment") proto.RegisterType((*WorkMoment)(nil), "office.WorkMoment") proto.RegisterType((*CreateOneWorkMomentReq)(nil), "office.CreateOneWorkMomentReq") @@ -2260,15 +2279,13 @@ func init() { proto.RegisterType((*CommentOneWorkMomentResp)(nil), "office.CommentOneWorkMomentResp") proto.RegisterType((*GetWorkMomentByIDReq)(nil), "office.GetWorkMomentByIDReq") proto.RegisterType((*GetWorkMomentByIDResp)(nil), "office.GetWorkMomentByIDResp") + proto.RegisterType((*ChangeWorkMomentPermissionReq)(nil), "office.ChangeWorkMomentPermissionReq") + proto.RegisterType((*ChangeWorkMomentPermissionResp)(nil), "office.ChangeWorkMomentPermissionResp") proto.RegisterType((*GetUserWorkMomentsReq)(nil), "office.GetUserWorkMomentsReq") proto.RegisterType((*GetUserWorkMomentsResp)(nil), "office.GetUserWorkMomentsResp") proto.RegisterType((*GetUserFriendWorkMomentsReq)(nil), "office.GetUserFriendWorkMomentsReq") proto.RegisterType((*GetUserFriendWorkMomentsResp)(nil), "office.GetUserFriendWorkMomentsResp") - proto.RegisterType((*CommentsMsg)(nil), "office.CommentsMsg") - proto.RegisterType((*GetUserWorkMomentsCommentsMsgReq)(nil), "office.GetUserWorkMomentsCommentsMsgReq") - proto.RegisterType((*GetUserWorkMomentsCommentsMsgResp)(nil), "office.GetUserWorkMomentsCommentsMsgResp") - proto.RegisterType((*ClearUserWorkMomentsCommentsMsgReq)(nil), "office.ClearUserWorkMomentsCommentsMsgReq") - proto.RegisterType((*ClearUserWorkMomentsCommentsMsgResp)(nil), "office.ClearUserWorkMomentsCommentsMsgResp") + proto.RegisterType((*WorkMomentNotificationMsg)(nil), "office.WorkMomentNotificationMsg") proto.RegisterType((*SetUserWorkMomentsLevelReq)(nil), "office.SetUserWorkMomentsLevelReq") proto.RegisterType((*SetUserWorkMomentsLevelResp)(nil), "office.SetUserWorkMomentsLevelResp") } @@ -2296,12 +2313,11 @@ type OfficeServiceClient interface { LikeOneWorkMoment(ctx context.Context, in *LikeOneWorkMomentReq, opts ...grpc.CallOption) (*LikeOneWorkMomentResp, error) CommentOneWorkMoment(ctx context.Context, in *CommentOneWorkMomentReq, opts ...grpc.CallOption) (*CommentOneWorkMomentResp, error) GetWorkMomentByID(ctx context.Context, in *GetWorkMomentByIDReq, opts ...grpc.CallOption) (*GetWorkMomentByIDResp, error) + ChangeWorkMomentPermission(ctx context.Context, in *ChangeWorkMomentPermissionReq, opts ...grpc.CallOption) (*ChangeWorkMomentPermissionResp, error) // / user self GetUserWorkMoments(ctx context.Context, in *GetUserWorkMomentsReq, opts ...grpc.CallOption) (*GetUserWorkMomentsResp, error) // / users friend GetUserFriendWorkMoments(ctx context.Context, in *GetUserFriendWorkMomentsReq, opts ...grpc.CallOption) (*GetUserFriendWorkMomentsResp, error) - GetUserWorkMomentsCommentsMsg(ctx context.Context, in *GetUserWorkMomentsCommentsMsgReq, opts ...grpc.CallOption) (*GetUserWorkMomentsCommentsMsgResp, error) - ClearUserWorkMomentsCommentsMsg(ctx context.Context, in *ClearUserWorkMomentsCommentsMsgReq, opts ...grpc.CallOption) (*ClearUserWorkMomentsCommentsMsgResp, error) SetUserWorkMomentsLevel(ctx context.Context, in *SetUserWorkMomentsLevelReq, opts ...grpc.CallOption) (*SetUserWorkMomentsLevelResp, error) } @@ -2421,36 +2437,27 @@ func (c *officeServiceClient) GetWorkMomentByID(ctx context.Context, in *GetWork return out, nil } -func (c *officeServiceClient) GetUserWorkMoments(ctx context.Context, in *GetUserWorkMomentsReq, opts ...grpc.CallOption) (*GetUserWorkMomentsResp, error) { - out := new(GetUserWorkMomentsResp) - err := grpc.Invoke(ctx, "/office.OfficeService/GetUserWorkMoments", in, out, c.cc, opts...) +func (c *officeServiceClient) ChangeWorkMomentPermission(ctx context.Context, in *ChangeWorkMomentPermissionReq, opts ...grpc.CallOption) (*ChangeWorkMomentPermissionResp, error) { + out := new(ChangeWorkMomentPermissionResp) + err := grpc.Invoke(ctx, "/office.OfficeService/ChangeWorkMomentPermission", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *officeServiceClient) GetUserFriendWorkMoments(ctx context.Context, in *GetUserFriendWorkMomentsReq, opts ...grpc.CallOption) (*GetUserFriendWorkMomentsResp, error) { - out := new(GetUserFriendWorkMomentsResp) - err := grpc.Invoke(ctx, "/office.OfficeService/GetUserFriendWorkMoments", in, out, c.cc, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *officeServiceClient) GetUserWorkMomentsCommentsMsg(ctx context.Context, in *GetUserWorkMomentsCommentsMsgReq, opts ...grpc.CallOption) (*GetUserWorkMomentsCommentsMsgResp, error) { - out := new(GetUserWorkMomentsCommentsMsgResp) - err := grpc.Invoke(ctx, "/office.OfficeService/GetUserWorkMomentsCommentsMsg", in, out, c.cc, opts...) +func (c *officeServiceClient) GetUserWorkMoments(ctx context.Context, in *GetUserWorkMomentsReq, opts ...grpc.CallOption) (*GetUserWorkMomentsResp, error) { + out := new(GetUserWorkMomentsResp) + err := grpc.Invoke(ctx, "/office.OfficeService/GetUserWorkMoments", in, out, c.cc, opts...) if err != nil { return nil, err } return out, nil } -func (c *officeServiceClient) ClearUserWorkMomentsCommentsMsg(ctx context.Context, in *ClearUserWorkMomentsCommentsMsgReq, opts ...grpc.CallOption) (*ClearUserWorkMomentsCommentsMsgResp, error) { - out := new(ClearUserWorkMomentsCommentsMsgResp) - err := grpc.Invoke(ctx, "/office.OfficeService/ClearUserWorkMomentsCommentsMsg", in, out, c.cc, opts...) +func (c *officeServiceClient) GetUserFriendWorkMoments(ctx context.Context, in *GetUserFriendWorkMomentsReq, opts ...grpc.CallOption) (*GetUserFriendWorkMomentsResp, error) { + out := new(GetUserFriendWorkMomentsResp) + err := grpc.Invoke(ctx, "/office.OfficeService/GetUserFriendWorkMoments", in, out, c.cc, opts...) if err != nil { return nil, err } @@ -2481,12 +2488,11 @@ type OfficeServiceServer interface { LikeOneWorkMoment(context.Context, *LikeOneWorkMomentReq) (*LikeOneWorkMomentResp, error) CommentOneWorkMoment(context.Context, *CommentOneWorkMomentReq) (*CommentOneWorkMomentResp, error) GetWorkMomentByID(context.Context, *GetWorkMomentByIDReq) (*GetWorkMomentByIDResp, error) + ChangeWorkMomentPermission(context.Context, *ChangeWorkMomentPermissionReq) (*ChangeWorkMomentPermissionResp, error) // / user self GetUserWorkMoments(context.Context, *GetUserWorkMomentsReq) (*GetUserWorkMomentsResp, error) // / users friend GetUserFriendWorkMoments(context.Context, *GetUserFriendWorkMomentsReq) (*GetUserFriendWorkMomentsResp, error) - GetUserWorkMomentsCommentsMsg(context.Context, *GetUserWorkMomentsCommentsMsgReq) (*GetUserWorkMomentsCommentsMsgResp, error) - ClearUserWorkMomentsCommentsMsg(context.Context, *ClearUserWorkMomentsCommentsMsgReq) (*ClearUserWorkMomentsCommentsMsgResp, error) SetUserWorkMomentsLevel(context.Context, *SetUserWorkMomentsLevelReq) (*SetUserWorkMomentsLevelResp, error) } @@ -2710,74 +2716,56 @@ func _OfficeService_GetWorkMomentByID_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } -func _OfficeService_GetUserWorkMoments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUserWorkMomentsReq) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(OfficeServiceServer).GetUserWorkMoments(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/office.OfficeService/GetUserWorkMoments", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OfficeServiceServer).GetUserWorkMoments(ctx, req.(*GetUserWorkMomentsReq)) - } - return interceptor(ctx, in, info, handler) -} - -func _OfficeService_GetUserFriendWorkMoments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUserFriendWorkMomentsReq) +func _OfficeService_ChangeWorkMomentPermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ChangeWorkMomentPermissionReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(OfficeServiceServer).GetUserFriendWorkMoments(ctx, in) + return srv.(OfficeServiceServer).ChangeWorkMomentPermission(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/office.OfficeService/GetUserFriendWorkMoments", + FullMethod: "/office.OfficeService/ChangeWorkMomentPermission", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OfficeServiceServer).GetUserFriendWorkMoments(ctx, req.(*GetUserFriendWorkMomentsReq)) + return srv.(OfficeServiceServer).ChangeWorkMomentPermission(ctx, req.(*ChangeWorkMomentPermissionReq)) } return interceptor(ctx, in, info, handler) } -func _OfficeService_GetUserWorkMomentsCommentsMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUserWorkMomentsCommentsMsgReq) +func _OfficeService_GetUserWorkMoments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserWorkMomentsReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(OfficeServiceServer).GetUserWorkMomentsCommentsMsg(ctx, in) + return srv.(OfficeServiceServer).GetUserWorkMoments(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/office.OfficeService/GetUserWorkMomentsCommentsMsg", + FullMethod: "/office.OfficeService/GetUserWorkMoments", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OfficeServiceServer).GetUserWorkMomentsCommentsMsg(ctx, req.(*GetUserWorkMomentsCommentsMsgReq)) + return srv.(OfficeServiceServer).GetUserWorkMoments(ctx, req.(*GetUserWorkMomentsReq)) } return interceptor(ctx, in, info, handler) } -func _OfficeService_ClearUserWorkMomentsCommentsMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ClearUserWorkMomentsCommentsMsgReq) +func _OfficeService_GetUserFriendWorkMoments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetUserFriendWorkMomentsReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(OfficeServiceServer).ClearUserWorkMomentsCommentsMsg(ctx, in) + return srv.(OfficeServiceServer).GetUserFriendWorkMoments(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/office.OfficeService/ClearUserWorkMomentsCommentsMsg", + FullMethod: "/office.OfficeService/GetUserFriendWorkMoments", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OfficeServiceServer).ClearUserWorkMomentsCommentsMsg(ctx, req.(*ClearUserWorkMomentsCommentsMsgReq)) + return srv.(OfficeServiceServer).GetUserFriendWorkMoments(ctx, req.(*GetUserFriendWorkMomentsReq)) } return interceptor(ctx, in, info, handler) } @@ -2852,6 +2840,10 @@ var _OfficeService_serviceDesc = grpc.ServiceDesc{ MethodName: "GetWorkMomentByID", Handler: _OfficeService_GetWorkMomentByID_Handler, }, + { + MethodName: "ChangeWorkMomentPermission", + Handler: _OfficeService_ChangeWorkMomentPermission_Handler, + }, { MethodName: "GetUserWorkMoments", Handler: _OfficeService_GetUserWorkMoments_Handler, @@ -2860,14 +2852,6 @@ var _OfficeService_serviceDesc = grpc.ServiceDesc{ MethodName: "GetUserFriendWorkMoments", Handler: _OfficeService_GetUserFriendWorkMoments_Handler, }, - { - MethodName: "GetUserWorkMomentsCommentsMsg", - Handler: _OfficeService_GetUserWorkMomentsCommentsMsg_Handler, - }, - { - MethodName: "ClearUserWorkMomentsCommentsMsg", - Handler: _OfficeService_ClearUserWorkMomentsCommentsMsg_Handler, - }, { MethodName: "SetUserWorkMomentsLevel", Handler: _OfficeService_SetUserWorkMomentsLevel_Handler, @@ -2877,105 +2861,106 @@ var _OfficeService_serviceDesc = grpc.ServiceDesc{ Metadata: "office/office.proto", } -func init() { proto.RegisterFile("office/office.proto", fileDescriptor_office_282f0d3c571a3eb6) } - -var fileDescriptor_office_282f0d3c571a3eb6 = []byte{ - // 1539 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcf, 0x6f, 0x1b, 0xc5, - 0x17, 0xd7, 0xda, 0x49, 0x1c, 0x3f, 0xa7, 0x4d, 0x33, 0x49, 0x13, 0x7f, 0xb7, 0x4d, 0xe2, 0x6e, - 0xfb, 0x95, 0xd2, 0x56, 0x72, 0x90, 0xa9, 0x04, 0x12, 0xa2, 0x42, 0xb5, 0x4b, 0x14, 0x88, 0xdb, - 0xb0, 0x49, 0xa8, 0xca, 0xa1, 0xd1, 0xd6, 0x99, 0x2c, 0xab, 0xd8, 0xbb, 0xdb, 0x9d, 0x4d, 0x4c, - 0xb9, 0x20, 0x71, 0xe1, 0xc6, 0x85, 0x03, 0x27, 0x2e, 0xfc, 0x0b, 0xfc, 0x0d, 0x1c, 0x38, 0x21, - 0x4e, 0x9c, 0x38, 0xc1, 0x1f, 0x82, 0x66, 0xf6, 0xc7, 0xcc, 0xec, 0x0f, 0xaf, 0xbb, 0xa5, 0x12, - 0x9c, 0xe2, 0xf7, 0xe6, 0xcd, 0x9b, 0xcf, 0xfb, 0xcc, 0x9b, 0x37, 0x6f, 0x27, 0xb0, 0xec, 0x9c, - 0x9e, 0x5a, 0x03, 0xbc, 0x1d, 0xfc, 0x69, 0xbb, 0x9e, 0xe3, 0x3b, 0x68, 0x2e, 0x90, 0xd4, 0x1b, - 0x8f, 0x5d, 0x6c, 0x1f, 0xef, 0xf6, 0xb7, 0xdd, 0x33, 0x73, 0x9b, 0x0d, 0x6d, 0x93, 0x93, 0xb3, - 0xe3, 0x31, 0xd9, 0x1e, 0x93, 0xc0, 0x54, 0xbb, 0x0f, 0xd0, 0x75, 0x46, 0x23, 0xc7, 0xd6, 0x31, - 0x71, 0x51, 0x13, 0x6a, 0xd8, 0xf3, 0xba, 0xce, 0x09, 0x6e, 0x2a, 0x2d, 0x65, 0x6b, 0x56, 0x8f, - 0x44, 0xb4, 0x0a, 0x73, 0xd8, 0xf3, 0xfa, 0xc4, 0x6c, 0x56, 0x5a, 0xca, 0x56, 0x5d, 0x0f, 0x25, - 0xed, 0x7d, 0xa8, 0x1d, 0x1a, 0xe6, 0x11, 0xc1, 0x1e, 0x35, 0x39, 0x27, 0xd8, 0xdb, 0xed, 0xb1, - 0xb9, 0x75, 0x3d, 0x94, 0x90, 0x0a, 0xf3, 0xf4, 0xd7, 0x23, 0x63, 0x84, 0xc3, 0xc9, 0xb1, 0xac, - 0x3d, 0x87, 0xea, 0xa1, 0x61, 0xa2, 0x15, 0x98, 0xf5, 0x0d, 0x33, 0x9e, 0x19, 0x08, 0x14, 0x8d, - 0x6f, 0x98, 0xc2, 0xbc, 0x48, 0x44, 0x77, 0x03, 0x97, 0x7b, 0x16, 0xf1, 0x9b, 0xd5, 0x56, 0x75, - 0xab, 0xd1, 0x59, 0x6c, 0x87, 0x0c, 0x84, 0x68, 0xf4, 0xd8, 0x40, 0xfb, 0x08, 0x2e, 0xef, 0x60, - 0x9f, 0x2a, 0x0f, 0x0d, 0x93, 0xe8, 0xf8, 0x45, 0x2e, 0xd2, 0x16, 0x34, 0x1c, 0x17, 0x7b, 0x86, - 0x6f, 0x39, 0xf6, 0x6e, 0x2f, 0x5c, 0x54, 0x54, 0x69, 0xa7, 0xb0, 0x28, 0xf9, 0x22, 0x2e, 0xea, - 0x00, 0x0c, 0x62, 0x06, 0x99, 0xc3, 0x46, 0x07, 0x45, 0x68, 0x38, 0xb7, 0xba, 0x60, 0x85, 0x36, - 0x61, 0xc6, 0x37, 0x4c, 0xd2, 0xac, 0x30, 0xec, 0x0d, 0x01, 0xbb, 0xce, 0x06, 0xb4, 0xaf, 0x15, - 0x58,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, 0x1b, 0xed, 0xf6, 0x9a, 0xb3, 0xac, 0x2a, 0xa5, 0xf4, - 0x14, 0xd7, 0xc0, 0xb1, 0x7d, 0x6c, 0xfb, 0x21, 0x15, 0x91, 0x98, 0x24, 0xaa, 0x96, 0x26, 0xea, - 0x21, 0x2c, 0x4a, 0x51, 0x96, 0x64, 0xeb, 0x3b, 0x05, 0x96, 0x76, 0x18, 0xe1, 0xd4, 0xdb, 0x9e, - 0x13, 0x94, 0x9a, 0x1e, 0xc0, 0xbe, 0x61, 0x5a, 0x36, 0x5b, 0x2c, 0xf4, 0x74, 0xab, 0x4d, 0xb0, - 0x77, 0x81, 0xbd, 0x63, 0xc3, 0xb5, 0x8e, 0x5d, 0xc3, 0x33, 0x46, 0xa4, 0xad, 0xe3, 0x17, 0xe7, - 0x98, 0xf8, 0xdc, 0x56, 0x17, 0xe6, 0xe5, 0x9e, 0xf1, 0xe2, 0xe3, 0xe1, 0x00, 0x70, 0x44, 0x52, - 0xdd, 0x54, 0x0a, 0xea, 0xa6, 0xc8, 0x69, 0x45, 0xe6, 0x54, 0x85, 0x79, 0xba, 0x03, 0x87, 0x56, - 0x98, 0xf3, 0x55, 0x3d, 0x96, 0xb5, 0x9f, 0x15, 0x40, 0x49, 0x1a, 0x4a, 0x56, 0xc9, 0x87, 0x12, - 0x77, 0x15, 0x36, 0xe7, 0xff, 0x99, 0xdc, 0x11, 0xd7, 0xb1, 0x09, 0xce, 0x21, 0xef, 0x1e, 0x34, - 0x7c, 0x8e, 0x26, 0xbc, 0x2f, 0x90, 0x10, 0x77, 0x38, 0xa4, 0x8b, 0x66, 0xda, 0x80, 0xed, 0x66, - 0x58, 0xe9, 0x1f, 0xbc, 0xdc, 0xed, 0xbd, 0x89, 0xe2, 0x65, 0x32, 0xae, 0xa4, 0x45, 0x4a, 0x72, - 0xb5, 0x0e, 0x55, 0xdf, 0x30, 0x43, 0x92, 0xa4, 0x0b, 0x85, 0xea, 0xb5, 0xfb, 0x30, 0xbf, 0x67, - 0x9d, 0xe1, 0xd2, 0xf7, 0xf4, 0x1f, 0x0a, 0xd4, 0xe8, 0xca, 0x74, 0xf7, 0x4b, 0xcc, 0xa7, 0x54, - 0x78, 0xd8, 0x1d, 0xbe, 0x0c, 0x2a, 0x58, 0x44, 0x85, 0xa0, 0x42, 0xb7, 0xe0, 0x52, 0x2c, 0x32, - 0x17, 0x41, 0x31, 0x90, 0x95, 0xb4, 0x92, 0x84, 0x49, 0x18, 0x16, 0x83, 0xba, 0xce, 0x15, 0x13, - 0xaa, 0xc0, 0x06, 0xc0, 0x20, 0xb8, 0xca, 0x68, 0xce, 0xd6, 0x58, 0x15, 0x11, 0x34, 0xda, 0x9f, - 0x15, 0x80, 0x27, 0x8e, 0x77, 0xd6, 0x77, 0x58, 0x88, 0x1a, 0x2c, 0x8c, 0x63, 0x29, 0x0e, 0x54, - 0xd2, 0xe5, 0x9e, 0x49, 0x01, 0x44, 0x55, 0x06, 0xd1, 0x86, 0xfa, 0x30, 0xdc, 0x04, 0xc2, 0xae, - 0x81, 0x46, 0xe7, 0x4a, 0xb4, 0x53, 0xd1, 0xee, 0xe8, 0xdc, 0x84, 0x9e, 0xd6, 0x41, 0xc0, 0x39, - 0x61, 0xf7, 0x80, 0x70, 0x5a, 0xc3, 0xbd, 0xd0, 0x63, 0x03, 0xf4, 0x16, 0x2c, 0x8f, 0x3f, 0x77, - 0xba, 0x86, 0x7d, 0x80, 0xc5, 0xfb, 0x63, 0x8e, 0x55, 0xdb, 0xac, 0x21, 0xd4, 0x81, 0x95, 0x40, - 0xed, 0xcb, 0x53, 0x6a, 0x6c, 0x4a, 0xe6, 0x18, 0xe5, 0xdf, 0x22, 0xfb, 0x9e, 0x75, 0x61, 0xf8, - 0xb8, 0x39, 0xdf, 0x52, 0xb6, 0xe6, 0x75, 0xae, 0xa0, 0x2c, 0x77, 0x39, 0xcb, 0x10, 0xb0, 0xcc, - 0x35, 0x9a, 0x0d, 0xab, 0x81, 0xf4, 0xd8, 0xc6,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x71, 0x11, 0x86, 0x66, - 0x5e, 0xa7, 0x80, 0x6e, 0x26, 0xe6, 0x66, 0xf5, 0x3a, 0xea, 0xad, 0x62, 0x23, 0xe2, 0x22, 0x1f, - 0xd6, 0x27, 0x5e, 0x44, 0x68, 0x2b, 0x1f, 0xa7, 0x5c, 0xd4, 0xd5, 0xdb, 0x53, 0x5a, 0x12, 0x17, - 0x7d, 0x09, 0x9b, 0x05, 0x55, 0x1c, 0xdd, 0x89, 0x37, 0xb2, 0xf0, 0x3a, 0x51, 0xef, 0x4e, 0x6d, - 0x4b, 0x5c, 0xf4, 0x1c, 0xd6, 0x72, 0x0a, 0x2f, 0xd2, 0x84, 0xea, 0x92, 0x73, 0x0f, 0xa8, 0x37, - 0x0b, 0x6d, 0x88, 0xfb, 0x60, 0xe9, 0xb3, 0xc5, 0x76, 0xf8, 0x1f, 0xae, 0xf7, 0x82, 0x3f, 0xcf, - 0xe7, 0xd8, 0xbf, 0xaf, 0xde, 0xfe, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x5e, 0xd9, 0x76, 0xae, 0x00, - 0x1b, 0x00, 0x00, +func init() { proto.RegisterFile("office/office.proto", fileDescriptor_office_1d2fa21c23f88044) } + +var fileDescriptor_office_1d2fa21c23f88044 = []byte{ + // 1559 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x59, 0xcd, 0x6e, 0x1c, 0xc5, + 0x13, 0xd7, 0xec, 0xa7, 0xb7, 0xd6, 0x89, 0xe3, 0x8e, 0x3f, 0x36, 0x93, 0xd8, 0xf1, 0x7f, 0x92, + 0xfc, 0x15, 0x3e, 0xb4, 0x46, 0x4b, 0x0e, 0x48, 0x88, 0x08, 0xc5, 0x9b, 0x58, 0x06, 0x6f, 0x62, + 0xc6, 0x36, 0x11, 0x1c, 0xb0, 0x26, 0xeb, 0xf6, 0x30, 0xf2, 0xee, 0xcc, 0x64, 0x7a,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xd4, 0x4d, 0x11, 0xd3, 0x8a, 0x8c, 0xa9, 0x0e, 0x73, 0xf4, 0x06, 0x0e, 0x9c, 0x38, + 0xe6, 0xab, 0x66, 0x4a, 0x1b, 0x3f, 0x69, 0x80, 0xb2, 0x30, 0x94, 0xac, 0x92, 0x8f, 0x25, 0xec, + 0x2a, 0x6c, 0xcf, 0x3d, 0x25, 0x76, 0xc4, 0xf7, 0x5c, 0x82, 0x0b, 0xc0, 0x7b, 0x00, 0xed, 0x90, + 0x5b, 0x13, 0xbf, 0x17, 0x48, 0xf0, 0x3b, 0x5e, 0x32, 0x45, 0x31, 0x63, 0xc8, 0x6e, 0x33, 0xae, + 0xf4, 0x8f, 0x2e, 0x77, 0xfa, 0xff, 0x44, 0xf1, 0xb2, 0x19, 0x56, 0xd2, 0x21, 0x25, 0xb1, 0x5a, + 0x83, 0x6a, 0x68, 0xd9, 0x31, 0x48, 0xd2, 0x83, 0x42, 0xf9, 0xc6, 0x43, 0x98, 0xdb, 0x75, 0x4e, + 0x71, 0xe9, 0x77, 0xfa, 0x09, 0x5c, 0x7b, 0xea, 0x85, 0xce, 0x89, 0x33, 0x64, 0xa6, 0x97, 0xd6, + 0xf3, 0x87, 0x06, 0x4d, 0xea, 0x01, 0x8d, 0xa2, 0x12, 0xfb, 0x69, 0x4c, 0x9e, 0x58, 0x43, 0x7c, + 0x68, 0xee, 0x26, 0xc5, 0x36, 0x26, 0x29, 0xd8, 0x01, 0xf6, 0x47, 0x97, 0x51, 0x8d, 0x4c, 0x9e, + 0x33, 0x81, 0x85, 0xee, 0xc2, 0x95, 0x94, 0x64, 0xca, 0xeb, 0x4c, 0x46, 0x66, 0xd2, 0x5a, 0x15, + 0x87, 0x79, 0x5a, 0x56, 0x39, 0x43, 0xcc, 0x89, 0xa6, 0x9c, 0x13, 0xeb, 0x00, 0xc3, 0xe8, 0xb1, + 0xa4, 0x59, 0x31, 0xc7, 0xea, 0x94, 0xc0, 0x31, 0x7e, 0xac, 0x02, 0x3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xaa, 0x0c, 0xf1, 0x1f, 0x2d, 0x7e, 0xbe, 0xd0, 0x8d, 0xff, 0x39, 0xf5, + 0x7e, 0xf4, 0xe7, 0x45, 0x83, 0xfd, 0xe7, 0xe9, 0xdd, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xaa, + 0xd5, 0x09, 0xd5, 0xbb, 0x1a, 0x00, 0x00, } diff --git a/pkg/proto/office/office.proto b/pkg/proto/office/office.proto index 0aca5fe82..0dd518e48 100644 --- a/pkg/proto/office/office.proto +++ b/pkg/proto/office/office.proto @@ -113,26 +113,35 @@ message LikeUser { string userName = 2; } +message NotificationUser { + string userID = 1; + string userName = 2; +} + message Comment { string userID = 1; string userName = 2; - string replyUserID = 3; - string replyUserName = 4; - string contentID = 5; - string content = 6; - int32 createTime = 7; + string faceURL = 3; + string replyUserID = 4; + string replyUserName = 5; + string contentID = 6; + string content = 7; + int32 createTime = 8; } message WorkMoment { string workMomentID = 1; string userID = 2; - string content = 3; - repeated LikeUser likeUsers = 4; - repeated Comment comments = 5; - repeated string whoCanSeeUserIDList = 6; - repeated string whoCantSeeUserIDList = 7; - bool isPrivate = 8; - int32 CreateTime = 10; + string userName = 3; + string faceURL = 4; + string content = 5; + repeated LikeUser likeUsers = 6; + repeated Comment comments = 7; + int32 permission = 8; + repeated string permissionUserIDList = 9; + repeated string permissionGroupIDList = 10; + repeated string atUserIDList = 11; + int32 createTime = 12; } message CreateOneWorkMomentReq { @@ -187,6 +196,18 @@ message GetWorkMomentByIDResp { WorkMoment workMoment = 2; } +message ChangeWorkMomentPermissionReq { + string workMomentID = 1; + string opUserID = 2; + int32 permission = 3; + repeated string permissionUserIDList = 4; + string operationID = 5; +} + +message ChangeWorkMomentPermissionResp { + CommonResp commonResp = 1; +} + message GetUserWorkMomentsReq { string userID = 1; server_api_params.RequestPagination Pagination = 2; @@ -211,32 +232,14 @@ message GetUserFriendWorkMomentsResp { server_api_params.ResponsePagination Pagination = 3; } -message CommentsMsg { - Comment comment = 1; - string workMomentID = 2; - string userID = 3; - string content = 4; -} - -message GetUserWorkMomentsCommentsMsgReq { - string userID = 1; - string operationID = 2; - server_api_params.RequestPagination Pagination = 3; -} - -message GetUserWorkMomentsCommentsMsgResp { - CommonResp commonResp = 1; - repeated CommentsMsg commentsMsgs = 2; - server_api_params.ResponsePagination Pagination = 3; -} - -message ClearUserWorkMomentsCommentsMsgReq { - string userID = 1; - string operationID = 2; -} - -message ClearUserWorkMomentsCommentsMsgResp { - CommonResp commonResp = 1; +message WorkMomentNotificationMsg { + int32 notificationMsgType = 1; + Comment comment = 2; + string workMomentID = 3; + string userID = 4; + string userName = 5; + string faceURL = 6; + string workMomentContent = 7; } message SetUserWorkMomentsLevelReq { @@ -263,12 +266,11 @@ service OfficeService { rpc LikeOneWorkMoment(LikeOneWorkMomentReq) returns(LikeOneWorkMomentResp); rpc CommentOneWorkMoment(CommentOneWorkMomentReq) returns(CommentOneWorkMomentResp); rpc GetWorkMomentByID(GetWorkMomentByIDReq) returns(GetWorkMomentByIDResp); + rpc ChangeWorkMomentPermission(ChangeWorkMomentPermissionReq) returns(ChangeWorkMomentPermissionResp); /// user self rpc GetUserWorkMoments(GetUserWorkMomentsReq) returns(GetUserWorkMomentsResp); /// users friend rpc GetUserFriendWorkMoments(GetUserFriendWorkMomentsReq) returns(GetUserFriendWorkMomentsResp); - rpc GetUserWorkMomentsCommentsMsg(GetUserWorkMomentsCommentsMsgReq) returns(GetUserWorkMomentsCommentsMsgResp); - rpc ClearUserWorkMomentsCommentsMsg(ClearUserWorkMomentsCommentsMsgReq) returns(ClearUserWorkMomentsCommentsMsgResp); rpc SetUserWorkMomentsLevel(SetUserWorkMomentsLevelReq) returns(SetUserWorkMomentsLevelResp); }