...
|
...
|
@@ -207,23 +207,23 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageBusinessRequest) (res |
|
|
}
|
|
|
|
|
|
// CommentArticle 评论文章
|
|
|
func (l *MiniBusinessLogic) CommentArticle(conn transaction.Conn, articleId int64, content string, at []int64) (err error) {
|
|
|
return l.createMessage(conn, domain.MsgTypeReply, domain.OptTypeArticle, articleId, 0, content, at)
|
|
|
func (l *MiniBusinessLogic) CommentArticle(conn transaction.Conn, articleId int64, sectionId int64, content string, at []int64) (err error) {
|
|
|
return l.createMessage(conn, domain.MsgTypeReply, domain.OptTypeArticle, articleId, sectionId, 0, content, at)
|
|
|
}
|
|
|
|
|
|
// CommentReply 评论回复
|
|
|
func (l *MiniBusinessLogic) CommentReply(conn transaction.Conn, articleId int64, commentId int64, content string, at []int64) (err error) {
|
|
|
return l.createMessage(conn, domain.MsgTypeReply, domain.OptTypeComment, articleId, commentId, content, at)
|
|
|
func (l *MiniBusinessLogic) CommentReply(conn transaction.Conn, articleId int64, sectionId int64, commentId int64, content string, at []int64) (err error) {
|
|
|
return l.createMessage(conn, domain.MsgTypeReply, domain.OptTypeComment, articleId, sectionId, commentId, content, at)
|
|
|
}
|
|
|
|
|
|
// LikeArticle 点赞文章
|
|
|
func (l *MiniBusinessLogic) LikeArticle(conn transaction.Conn, articleId int64, at int64) (err error) {
|
|
|
return l.createMessage(conn, domain.MsgTypeLike, domain.OptTypeArticle, articleId, 0, "", []int64{at})
|
|
|
return l.createMessage(conn, domain.MsgTypeLike, domain.OptTypeArticle, articleId, 0, 0, "", []int64{at})
|
|
|
}
|
|
|
|
|
|
// LikeComment 点赞评论
|
|
|
func (l *MiniBusinessLogic) LikeComment(conn transaction.Conn, articleId int64, commentId int64, at int64) (err error) {
|
|
|
return l.createMessage(conn, domain.MsgTypeLike, domain.OptTypeComment, articleId, commentId, "", []int64{at})
|
|
|
func (l *MiniBusinessLogic) LikeComment(conn transaction.Conn, articleId int64, sectionId int64, commentId int64, at int64) (err error) {
|
|
|
return l.createMessage(conn, domain.MsgTypeLike, domain.OptTypeComment, articleId, sectionId, commentId, "", []int64{at})
|
|
|
}
|
|
|
|
|
|
func (l *MiniBusinessLogic) createMessage(
|
...
|
...
|
@@ -231,6 +231,7 @@ func (l *MiniBusinessLogic) createMessage( |
|
|
msgType domain.MsgBusinessType,
|
|
|
optType domain.MsgBusinessOpt,
|
|
|
articleId int64,
|
|
|
sectionId int64,
|
|
|
commentId int64,
|
|
|
content string,
|
|
|
at []int64) (err error) {
|
...
|
...
|
@@ -245,6 +246,7 @@ func (l *MiniBusinessLogic) createMessage( |
|
|
UserId: userToken.UserId,
|
|
|
RecipientId: at[i],
|
|
|
ArticleId: articleId,
|
|
|
SectionId: sectionId,
|
|
|
CommentId: commentId,
|
|
|
Content: content,
|
|
|
}
|
...
|
...
|
|