正在显示
5 个修改的文件
包含
9 行增加
和
1 行删除
| @@ -2,6 +2,7 @@ package article | @@ -2,6 +2,7 @@ package article | ||
| 2 | 2 | ||
| 3 | import ( | 3 | import ( |
| 4 | "context" | 4 | "context" |
| 5 | + | ||
| 5 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/logic/message" | 6 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/logic/message" |
| 6 | 7 | ||
| 7 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/svc" | 8 | "gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss/cmd/discuss/api/internal/svc" |
| @@ -249,6 +250,7 @@ func (l *MiniSetUserLikeLogic) setUserLikeArticle(req *types.MiniSetUserLikeRequ | @@ -249,6 +250,7 @@ func (l *MiniSetUserLikeLogic) setUserLikeArticle(req *types.MiniSetUserLikeRequ | ||
| 249 | CommentId: 0, | 250 | CommentId: 0, |
| 250 | CommentAuthor: 0, | 251 | CommentAuthor: 0, |
| 251 | UserId: req.UserId, | 252 | UserId: req.UserId, |
| 253 | + ToUserId: articleInfo.AuthorId, | ||
| 252 | } | 254 | } |
| 253 | // 添加点赞标识 | 255 | // 添加点赞标识 |
| 254 | _, err = l.svcCtx.UserLoveFlagRepository.Insert(ctx, c, &flagInfo) | 256 | _, err = l.svcCtx.UserLoveFlagRepository.Insert(ctx, c, &flagInfo) |
| @@ -338,6 +340,7 @@ func (l *MiniSetUserLikeLogic) setUserLikeComment(req *types.MiniSetUserLikeRequ | @@ -338,6 +340,7 @@ func (l *MiniSetUserLikeLogic) setUserLikeComment(req *types.MiniSetUserLikeRequ | ||
| 338 | CommentId: req.CommentId, | 340 | CommentId: req.CommentId, |
| 339 | CommentAuthor: commentInfo.FromUserId, | 341 | CommentAuthor: commentInfo.FromUserId, |
| 340 | UserId: req.UserId, | 342 | UserId: req.UserId, |
| 343 | + ToUserId: commentInfo.FromUserId, | ||
| 341 | } | 344 | } |
| 342 | // 设置赞标识 | 345 | // 设置赞标识 |
| 343 | _, err = l.svcCtx.UserLoveFlagRepository.Insert(ctx, c, &flagInfo) | 346 | _, err = l.svcCtx.UserLoveFlagRepository.Insert(ctx, c, &flagInfo) |
| @@ -52,6 +52,7 @@ func (l *SystemEditAticleCommentShowLogic) SystemEditAticleCommentShow(req *type | @@ -52,6 +52,7 @@ func (l *SystemEditAticleCommentShowLogic) SystemEditAticleCommentShow(req *type | ||
| 52 | } | 52 | } |
| 53 | } | 53 | } |
| 54 | } | 54 | } |
| 55 | + | ||
| 55 | if err != nil { | 56 | if err != nil { |
| 56 | return resp, err | 57 | return resp, err |
| 57 | } | 58 | } |
| @@ -16,6 +16,7 @@ type UserLoveFlag struct { | @@ -16,6 +16,7 @@ type UserLoveFlag struct { | ||
| 16 | ArticleAuthor int64 // 文章的发布人 | 16 | ArticleAuthor int64 // 文章的发布人 |
| 17 | CommentAuthor int64 // 评论的填写人 | 17 | CommentAuthor int64 // 评论的填写人 |
| 18 | UserId int64 | 18 | UserId int64 |
| 19 | + ToUserId int64 | ||
| 19 | CreatedAt int64 | 20 | CreatedAt int64 |
| 20 | UpdatedAt int64 | 21 | UpdatedAt int64 |
| 21 | DeletedAt int64 | 22 | DeletedAt int64 |
| @@ -160,6 +160,7 @@ func (repository *UserLoveFlagRepository) ModelToDomainModel(from *models.UserLo | @@ -160,6 +160,7 @@ func (repository *UserLoveFlagRepository) ModelToDomainModel(from *models.UserLo | ||
| 160 | CommentAuthor: from.CommentAuthor, | 160 | CommentAuthor: from.CommentAuthor, |
| 161 | CommentId: from.CommentId, | 161 | CommentId: from.CommentId, |
| 162 | UserId: from.UserId, | 162 | UserId: from.UserId, |
| 163 | + ToUserId: from.ToUserId, | ||
| 163 | CreatedAt: from.CreatedAt, | 164 | CreatedAt: from.CreatedAt, |
| 164 | UpdatedAt: from.UpdatedAt, | 165 | UpdatedAt: from.UpdatedAt, |
| 165 | DeletedAt: from.DeletedAt, | 166 | DeletedAt: from.DeletedAt, |
| @@ -177,6 +178,7 @@ func (repository *UserLoveFlagRepository) DomainModelToModel(from *domain.UserLo | @@ -177,6 +178,7 @@ func (repository *UserLoveFlagRepository) DomainModelToModel(from *domain.UserLo | ||
| 177 | ArticleAuthor: from.ArticleAuthor, | 178 | ArticleAuthor: from.ArticleAuthor, |
| 178 | CommentAuthor: from.CommentAuthor, | 179 | CommentAuthor: from.CommentAuthor, |
| 179 | UserId: from.UserId, | 180 | UserId: from.UserId, |
| 181 | + ToUserId: from.ToUserId, | ||
| 180 | CreatedAt: from.CreatedAt, | 182 | CreatedAt: from.CreatedAt, |
| 181 | UpdatedAt: from.UpdatedAt, | 183 | UpdatedAt: from.UpdatedAt, |
| 182 | DeletedAt: from.DeletedAt, | 184 | DeletedAt: from.DeletedAt, |
| @@ -14,7 +14,8 @@ type UserLoveFlag struct { | @@ -14,7 +14,8 @@ type UserLoveFlag struct { | ||
| 14 | ArticleAuthor int64 `json:"articleAuthor"` // 文章的发布人 | 14 | ArticleAuthor int64 `json:"articleAuthor"` // 文章的发布人 |
| 15 | CommentId int64 `json:"commentId"` // 点赞评论时,填评论id | 15 | CommentId int64 `json:"commentId"` // 点赞评论时,填评论id |
| 16 | CommentAuthor int64 `json:"commentAuthor"` // 评论的填写人 | 16 | CommentAuthor int64 `json:"commentAuthor"` // 评论的填写人 |
| 17 | - UserId int64 `json:"userId"` | 17 | + ToUserId int64 `json:"toUserId"` // 点赞的接受人 |
| 18 | + UserId int64 `json:"userId"` // 点赞的人 | ||
| 18 | CreatedAt int64 `json:"createdAt,omitempty"` | 19 | CreatedAt int64 `json:"createdAt,omitempty"` |
| 19 | UpdatedAt int64 `json:"updatedAt,omitempty"` | 20 | UpdatedAt int64 `json:"updatedAt,omitempty"` |
| 20 | DeletedAt int64 `json:"deletedAt,omitempty"` | 21 | DeletedAt int64 `json:"deletedAt,omitempty"` |
-
请 注册 或 登录 后发表评论