|
|
@ -450,6 +450,7 @@ func (s *officeServer) CommentOneWorkMoment(_ context.Context, req *pbOffice.Com
|
|
|
|
Content: comment.Content,
|
|
|
|
Content: comment.Content,
|
|
|
|
CreateTime: comment.CreateTime,
|
|
|
|
CreateTime: comment.CreateTime,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "msg: ", *workMomentNotificationMsg)
|
|
|
|
if req.UserID != workMoment.UserID {
|
|
|
|
if req.UserID != workMoment.UserID {
|
|
|
|
msg.WorkMomentSendNotification(req.OperationID, workMoment.UserID, workMomentNotificationMsg)
|
|
|
|
msg.WorkMomentSendNotification(req.OperationID, workMoment.UserID, workMomentNotificationMsg)
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -510,16 +511,7 @@ func (s *officeServer) GetUserFriendWorkMoments(_ context.Context, req *pbOffice
|
|
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
|
|
|
|
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "req: ", req.String())
|
|
|
|
resp = &pbOffice.GetUserFriendWorkMomentsResp{CommonResp: &pbOffice.CommonResp{}, WorkMoments: []*pbOffice.WorkMoment{}}
|
|
|
|
resp = &pbOffice.GetUserFriendWorkMomentsResp{CommonResp: &pbOffice.CommonResp{}, WorkMoments: []*pbOffice.WorkMoment{}}
|
|
|
|
resp.Pagination = &pbCommon.ResponsePagination{CurrentPage: req.Pagination.PageNumber, ShowNumber: req.Pagination.ShowNumber}
|
|
|
|
resp.Pagination = &pbCommon.ResponsePagination{CurrentPage: req.Pagination.PageNumber, ShowNumber: req.Pagination.ShowNumber}
|
|
|
|
friendIDList, err := imdb.GetFriendIDListByUserID(req.UserID)
|
|
|
|
workMoments, err := db.DB.GetUserFriendWorkMoments(req.Pagination.ShowNumber, req.Pagination.PageNumber, req.UserID)
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetFriendIDListByUserID", err.Error())
|
|
|
|
|
|
|
|
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
|
|
|
|
|
|
|
|
return resp, nil
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
for _, friendID := range friendIDList {
|
|
|
|
|
|
|
|
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), friendID)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
workMoments, err := db.DB.GetUserFriendWorkMoments(friendIDList, req.Pagination.ShowNumber, req.Pagination.PageNumber, req.UserID)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserFriendWorkMoments", err.Error())
|
|
|
|
log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetUserFriendWorkMoments", err.Error())
|
|
|
|
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
|
|
|
|
resp.CommonResp = &pbOffice.CommonResp{ErrCode: constant.ErrDB.ErrCode, ErrMsg: constant.ErrDB.ErrMsg}
|
|
|
|