|
@@ -248,13 +248,13 @@ func (l *MiniBusinessLogic) LikeComment(conn transaction.Conn, articleId int64, |
|
@@ -248,13 +248,13 @@ func (l *MiniBusinessLogic) LikeComment(conn transaction.Conn, articleId int64, |
248
|
}
|
248
|
}
|
249
|
|
249
|
|
250
|
// UnLikeArticle 取消点赞文章
|
250
|
// UnLikeArticle 取消点赞文章
|
251
|
-func (l *MiniBusinessLogic) UnLikeArticle(conn transaction.Conn, articleId int64) (err error) {
|
|
|
252
|
- return l.deleteMessage(conn, domain.OptTypeArticle, articleId, 0)
|
251
|
+func (l *MiniBusinessLogic) UnLikeArticle(conn transaction.Conn, articleId int64, recipientId int64) (err error) {
|
|
|
252
|
+ return l.deleteMessage(conn, domain.OptTypeArticle, articleId, 0, recipientId)
|
253
|
}
|
253
|
}
|
254
|
|
254
|
|
255
|
// UnLikeComment 取消点赞评论
|
255
|
// UnLikeComment 取消点赞评论
|
256
|
-func (l *MiniBusinessLogic) UnLikeComment(conn transaction.Conn, articleId int64, commentId int64) (err error) {
|
|
|
257
|
- return l.deleteMessage(conn, domain.OptTypeComment, articleId, commentId)
|
256
|
+func (l *MiniBusinessLogic) UnLikeComment(conn transaction.Conn, articleId int64, commentId int64, recipientId int64) (err error) {
|
|
|
257
|
+ return l.deleteMessage(conn, domain.OptTypeComment, articleId, commentId, recipientId)
|
258
|
}
|
258
|
}
|
259
|
|
259
|
|
260
|
func (l *MiniBusinessLogic) createMessage(
|
260
|
func (l *MiniBusinessLogic) createMessage(
|
|
@@ -287,14 +287,14 @@ func (l *MiniBusinessLogic) createMessage( |
|
@@ -287,14 +287,14 @@ func (l *MiniBusinessLogic) createMessage( |
287
|
return nil
|
287
|
return nil
|
288
|
}
|
288
|
}
|
289
|
|
289
|
|
290
|
-func (l *MiniBusinessLogic) deleteMessage(conn transaction.Conn, optType domain.MsgBusinessOpt, articleId int64, commentId int64) (err error) {
|
290
|
+func (l *MiniBusinessLogic) deleteMessage(conn transaction.Conn, optType domain.MsgBusinessOpt, articleId int64, commentId int64, recipientId int64) (err error) {
|
291
|
var userToken = contextdata.GetUserTokenFromCtx(l.ctx)
|
291
|
var userToken = contextdata.GetUserTokenFromCtx(l.ctx)
|
292
|
|
292
|
|
293
|
queryOption := domain.NewQueryOptions().WithFindOnly().WithOffsetLimit(1, 1).
|
293
|
queryOption := domain.NewQueryOptions().WithFindOnly().WithOffsetLimit(1, 1).
|
294
|
MustWithKV("type", domain.MsgTypeLike).
|
294
|
MustWithKV("type", domain.MsgTypeLike).
|
295
|
MustWithKV("optType", optType).
|
295
|
MustWithKV("optType", optType).
|
296
|
MustWithKV("companyId", userToken.CompanyId).
|
296
|
MustWithKV("companyId", userToken.CompanyId).
|
297
|
- MustWithKV("recipientId", userToken.UserId).
|
297
|
+ MustWithKV("recipientId", recipientId).
|
298
|
MustWithKV("articleId", articleId).
|
298
|
MustWithKV("articleId", articleId).
|
299
|
MustWithKV("commentId", commentId)
|
299
|
MustWithKV("commentId", commentId)
|
300
|
|
300
|
|