Merge branch 'dev' of http://gitlab.fjmaimaimai.com/allied-creation/sumifcc-discuss into dev
正在显示
11 个修改的文件
包含
96 行增加
和
77 行删除
| @@ -52,19 +52,20 @@ type ( | @@ -52,19 +52,20 @@ type ( | ||
| 52 | MessageBusinessItem { | 52 | MessageBusinessItem { |
| 53 | Id int64 `json:"id"` | 53 | Id int64 `json:"id"` |
| 54 | Type int `json:"type"` // 分类 (1回复 2点赞 3被采纳) | 54 | Type int `json:"type"` // 分类 (1回复 2点赞 3被采纳) |
| 55 | - OptType int `json:"optType"` // 操作类型(1针对文章、2针对评论、3针对圆桌) | 55 | + OptType int `json:"optType"` // 操作类型(1针对文章或段落、2针对评论、3针对圆桌) |
| 56 | CompanyId int64 `json:"companyId"` // 操作人公司ID | 56 | CompanyId int64 `json:"companyId"` // 操作人公司ID |
| 57 | UserId int64 `json:"userId"` // 操作人用户ID | 57 | UserId int64 `json:"userId"` // 操作人用户ID |
| 58 | RecipientId int64 `json:"recipientId"` // 接收者ID | 58 | RecipientId int64 `json:"recipientId"` // 接收者ID |
| 59 | ArticleId int64 `json:"articleId"` // 文章ID | 59 | ArticleId int64 `json:"articleId"` // 文章ID |
| 60 | - CommentId int64 `json:"commentId"` // 评论ID | ||
| 61 | - DiscussionId int64 `json:"discussionId"` // 圆桌ID | ||
| 62 | - DiscussionOpinionId int64 `json:"discussionOpinionId"` // 观点ID | ||
| 63 | - Content string `json:"content"` // 消息内容 | 60 | +// CommentId int64 `json:"commentId"` // 评论ID |
| 61 | +// DiscussionId int64 `json:"discussionId"` // 圆桌ID | ||
| 62 | +// DiscussionOpinionId int64 `json:"discussionOpinionId"` // 观点ID | ||
| 63 | +// Content string `json:"content"` // 消息内容 | ||
| 64 | CreatedAt int64 `json:"createdAt"` // 创建时间 | 64 | CreatedAt int64 `json:"createdAt"` // 创建时间 |
| 65 | User *SimpleUser `json:"user"` // 操作人 | 65 | User *SimpleUser `json:"user"` // 操作人 |
| 66 | Article *SimpleArticle `json:"article"` // 文章 | 66 | Article *SimpleArticle `json:"article"` // 文章 |
| 67 | - Comment *SimpleComment `json:"comment"` // 评论(不一定是自己,可能是被人@到) | 67 | + Comment *SimpleComment `json:"comment"` // 评论 |
| 68 | + CommentParent *SimpleComment `json:"commentParent"` // 被回复的评论 | ||
| 68 | } | 69 | } |
| 69 | 70 | ||
| 70 | SimpleUser { | 71 | SimpleUser { |
| @@ -260,14 +260,13 @@ type ( | @@ -260,14 +260,13 @@ type ( | ||
| 260 | SimpleComment { | 260 | SimpleComment { |
| 261 | Id int64 `json:"id"` | 261 | Id int64 `json:"id"` |
| 262 | Content string `json:"content"` // 评论内容 | 262 | Content string `json:"content"` // 评论内容 |
| 263 | - CountLove int `json:"countLove"` // 点赞数量 | ||
| 264 | - CountComment int `json:"countComment"` // 评论数量 | ||
| 265 | Show int `json:"show"` // 评论的展示状态(0显示、1不显示) | 263 | Show int `json:"show"` // 评论的展示状态(0显示、1不显示) |
| 266 | - AtWho []SimpleUser `json:"atWho"` // @用户 | ||
| 267 | - MatchUrl map[string]string `json:"matchUrl"` // 内容中的url文本 | 264 | + AtWho []CommentAtWho `json:"atWho"` // 填写评论时@的人 |
| 265 | + MatchUrl map[string]string `json:"matchUrl"` // 评论内容中的url文本 | ||
| 266 | + CountReply int `json:"countReply"` // 用户回复数量 | ||
| 267 | + CountUserLove int `json:"countUserLove"` // 用户点赞数量 | ||
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | - | ||
| 271 | MiniBeLikedRequest{ | 270 | MiniBeLikedRequest{ |
| 272 | Page int `json:"page"` | 271 | Page int `json:"page"` |
| 273 | Size int `json:"size"` | 272 | Size int `json:"size"` |
| @@ -357,7 +357,7 @@ func (l *MiniSetUserLikeLogic) setUserLikeComment(req *types.MiniSetUserLikeRequ | @@ -357,7 +357,7 @@ func (l *MiniSetUserLikeLogic) setUserLikeComment(req *types.MiniSetUserLikeRequ | ||
| 357 | 357 | ||
| 358 | // 创建点赞消息 | 358 | // 创建点赞消息 |
| 359 | var messageLogic = message.NewMiniBusinessLogic(l.ctx, l.svcCtx) | 359 | var messageLogic = message.NewMiniBusinessLogic(l.ctx, l.svcCtx) |
| 360 | - err = messageLogic.LikeComment(c, commentInfo.ArticleId, commentInfo.Id, commentInfo.FromUserId) | 360 | + err = messageLogic.LikeComment(c, commentInfo.ArticleId, commentInfo.Id, commentInfo.Pid, commentInfo.FromUserId) |
| 361 | if err != nil { | 361 | if err != nil { |
| 362 | return err | 362 | return err |
| 363 | } | 363 | } |
| @@ -205,9 +205,9 @@ func (l *MiniCreateArticleCommentLogic) MiniCreateArticleComment(req *types.Mini | @@ -205,9 +205,9 @@ func (l *MiniCreateArticleCommentLogic) MiniCreateArticleComment(req *types.Mini | ||
| 205 | atAllIds = append(atAllIds, atWhoIds...) | 205 | atAllIds = append(atAllIds, atWhoIds...) |
| 206 | var messageLogic = message.NewMiniBusinessLogic(l.ctx, l.svcCtx) | 206 | var messageLogic = message.NewMiniBusinessLogic(l.ctx, l.svcCtx) |
| 207 | if pComment != nil { | 207 | if pComment != nil { |
| 208 | - err = messageLogic.CommentReply(c, pComment.ArticleId, pComment.SectionId, pComment.Id, req.Content, atAllIds) // 对评论回复 | 208 | + err = messageLogic.CommentReply(c, req.ArtitcleId, newComment.Id, pComment.Id, atAllIds) // 对评论回复 |
| 209 | } else { | 209 | } else { |
| 210 | - err = messageLogic.CommentArticle(c, req.ArtitcleId, req.SectionId, req.Content, atAllIds) // 对文章回复 | 210 | + err = messageLogic.CommentArticle(c, req.ArtitcleId, newComment.Id, atAllIds) // 对文章回复 |
| 211 | } | 211 | } |
| 212 | if err != nil { | 212 | if err != nil { |
| 213 | return err | 213 | return err |
| @@ -50,8 +50,7 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma | @@ -50,8 +50,7 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma | ||
| 50 | var userIdMap = map[int64]*domain.User{} | 50 | var userIdMap = map[int64]*domain.User{} |
| 51 | var articleIdMap = map[int64]*domain.Article{} | 51 | var articleIdMap = map[int64]*domain.Article{} |
| 52 | var commentIdMap = map[int64]*domain.ArticleComment{} | 52 | var commentIdMap = map[int64]*domain.ArticleComment{} |
| 53 | - //var discussionIdMap = map[int64]int{} | ||
| 54 | - //var discussionOpinionIdMap = map[int64]int{} | 53 | + |
| 55 | for _, item := range list { | 54 | for _, item := range list { |
| 56 | if item.CompanyId != 0 { | 55 | if item.CompanyId != 0 { |
| 57 | companyIdMap[item.CompanyId] = nil | 56 | companyIdMap[item.CompanyId] = nil |
| @@ -65,19 +64,15 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma | @@ -65,19 +64,15 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma | ||
| 65 | if item.CommentId != 0 { | 64 | if item.CommentId != 0 { |
| 66 | commentIdMap[item.CommentId] = nil | 65 | commentIdMap[item.CommentId] = nil |
| 67 | } | 66 | } |
| 68 | - //if item.DiscussionId != 0 { | ||
| 69 | - // discussionIdMap[item.DiscussionId] = 0 | ||
| 70 | - //} | ||
| 71 | - //if item.DiscussionOpinionId != 0 { | ||
| 72 | - // discussionOpinionIdMap[item.DiscussionOpinionId] = 0 | ||
| 73 | - //} | 67 | + if item.CommentParentId != 0 { |
| 68 | + commentIdMap[item.CommentParentId] = nil | ||
| 69 | + } | ||
| 74 | } | 70 | } |
| 75 | var companyIds = make([]int64, 0) // 公司ID | 71 | var companyIds = make([]int64, 0) // 公司ID |
| 76 | var userIds = make([]int64, 0) // 用户ID | 72 | var userIds = make([]int64, 0) // 用户ID |
| 77 | var articleIds = make([]int64, 0) // 文章ID | 73 | var articleIds = make([]int64, 0) // 文章ID |
| 78 | - var commentIds = make([]int64, 0) // 评论ID | ||
| 79 | - //var discussionIds = make([]int64, 0) // 讨论ID 暂时搁置 | ||
| 80 | - //var discussionOpinionIds = make([]int64, 0) // 观点ID | 74 | + var commentIds = make([]int64, 0) // 评论ID(包含回复的评论) |
| 75 | + | ||
| 81 | for k, _ := range companyIdMap { | 76 | for k, _ := range companyIdMap { |
| 82 | companyIds = append(companyIds, k) | 77 | companyIds = append(companyIds, k) |
| 83 | } | 78 | } |
| @@ -90,12 +85,6 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma | @@ -90,12 +85,6 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma | ||
| 90 | for k, _ := range commentIdMap { | 85 | for k, _ := range commentIdMap { |
| 91 | commentIds = append(commentIds, k) | 86 | commentIds = append(commentIds, k) |
| 92 | } | 87 | } |
| 93 | - //for k, _ := range discussionIdMap { | ||
| 94 | - // discussionIds = append(discussionIds, k) | ||
| 95 | - //} | ||
| 96 | - //for k, _ := range discussionOpinionIdMap { | ||
| 97 | - // discussionOpinionIds = append(discussionOpinionIds, k) | ||
| 98 | - //} | ||
| 99 | 88 | ||
| 100 | // 获取公司 | 89 | // 获取公司 |
| 101 | if len(companyIds) > 0 { | 90 | if len(companyIds) > 0 { |
| @@ -166,13 +155,10 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma | @@ -166,13 +155,10 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma | ||
| 166 | UserId: item.UserId, | 155 | UserId: item.UserId, |
| 167 | RecipientId: item.RecipientId, | 156 | RecipientId: item.RecipientId, |
| 168 | ArticleId: item.ArticleId, | 157 | ArticleId: item.ArticleId, |
| 169 | - CommentId: item.CommentId, | ||
| 170 | - //DiscussionId: item.DiscussionId, | ||
| 171 | - //DiscussionOpinionId: item.DiscussionOpinionId, | ||
| 172 | - Content: item.Content, | ||
| 173 | CreatedAt: item.CreatedAt, | 158 | CreatedAt: item.CreatedAt, |
| 174 | } | 159 | } |
| 175 | 160 | ||
| 161 | + // 发布者 | ||
| 176 | if v, ok := userIdMap[item.UserId]; ok && v != nil { | 162 | if v, ok := userIdMap[item.UserId]; ok && v != nil { |
| 177 | to.User = &types.SimpleUser{ | 163 | to.User = &types.SimpleUser{ |
| 178 | Id: v.Id, | 164 | Id: v.Id, |
| @@ -187,6 +173,7 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma | @@ -187,6 +173,7 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma | ||
| 187 | } | 173 | } |
| 188 | } | 174 | } |
| 189 | 175 | ||
| 176 | + // 文章 | ||
| 190 | if v, ok := articleIdMap[item.ArticleId]; ok && v != nil { | 177 | if v, ok := articleIdMap[item.ArticleId]; ok && v != nil { |
| 191 | to.Article = &types.SimpleArticle{ | 178 | to.Article = &types.SimpleArticle{ |
| 192 | Id: v.Id, | 179 | Id: v.Id, |
| @@ -197,20 +184,40 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma | @@ -197,20 +184,40 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma | ||
| 197 | } | 184 | } |
| 198 | } | 185 | } |
| 199 | 186 | ||
| 187 | + // 评论 | ||
| 200 | if v, ok := commentIdMap[item.CommentId]; ok && v != nil { | 188 | if v, ok := commentIdMap[item.CommentId]; ok && v != nil { |
| 201 | to.Comment = &types.SimpleComment{ | 189 | to.Comment = &types.SimpleComment{ |
| 202 | Id: v.Id, | 190 | Id: v.Id, |
| 203 | Content: v.Content, | 191 | Content: v.Content, |
| 204 | - CountLove: v.CountUserLove, | ||
| 205 | - CountComment: v.CountReply, | ||
| 206 | Show: int(v.Show), | 192 | Show: int(v.Show), |
| 193 | + CountReply: v.CountReply, | ||
| 194 | + CountUserLove: v.CountUserLove, | ||
| 195 | + MatchUrl: v.MatchUrl, | ||
| 196 | + } | ||
| 197 | + to.Comment.AtWho = make([]types.CommentAtWho, 0) | ||
| 198 | + for _, who := range v.AtWho { | ||
| 199 | + to.Comment.AtWho = append(to.Comment.AtWho, types.CommentAtWho{ | ||
| 200 | + Id: who.Id, | ||
| 201 | + Name: who.Name, | ||
| 202 | + }) | ||
| 203 | + } | ||
| 204 | + } | ||
| 205 | + | ||
| 206 | + // 被回复的评论 | ||
| 207 | + if v, ok := commentIdMap[item.CommentParentId]; ok && v != nil { | ||
| 208 | + to.CommentParent = &types.SimpleComment{ | ||
| 209 | + Id: v.Id, | ||
| 210 | + Content: v.Content, | ||
| 211 | + Show: int(v.Show), | ||
| 212 | + CountReply: v.CountReply, | ||
| 213 | + CountUserLove: v.CountUserLove, | ||
| 207 | MatchUrl: v.MatchUrl, | 214 | MatchUrl: v.MatchUrl, |
| 208 | } | 215 | } |
| 209 | - to.Comment.AtWho = make([]types.SimpleUser, 0) | ||
| 210 | - for _, at := range v.AtWho { | ||
| 211 | - to.Comment.AtWho = append(to.Comment.AtWho, types.SimpleUser{ | ||
| 212 | - Id: at.Id, | ||
| 213 | - Name: at.Name, | 216 | + to.CommentParent.AtWho = make([]types.CommentAtWho, 0) |
| 217 | + for _, who := range v.AtWho { | ||
| 218 | + to.CommentParent.AtWho = append(to.CommentParent.AtWho, types.CommentAtWho{ | ||
| 219 | + Id: who.Id, | ||
| 220 | + Name: who.Name, | ||
| 214 | }) | 221 | }) |
| 215 | } | 222 | } |
| 216 | } | 223 | } |
| @@ -221,23 +228,23 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma | @@ -221,23 +228,23 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType doma | ||
| 221 | } | 228 | } |
| 222 | 229 | ||
| 223 | // CommentArticle 评论文章 | 230 | // CommentArticle 评论文章 |
| 224 | -func (l *MiniBusinessLogic) CommentArticle(conn transaction.Conn, articleId int64, sectionId int64, content string, at []int64) (err error) { | ||
| 225 | - return l.createMessage(conn, domain.MsgTypeReply, domain.OptTypeArticle, articleId, sectionId, 0, content, at) | 231 | +func (l *MiniBusinessLogic) CommentArticle(conn transaction.Conn, articleId int64, commentId int64, at []int64) (err error) { |
| 232 | + return l.createMessage(conn, domain.MsgTypeReply, domain.OptTypeArticle, articleId, commentId, 0, at) | ||
| 226 | } | 233 | } |
| 227 | 234 | ||
| 228 | // CommentReply 评论回复 | 235 | // CommentReply 评论回复 |
| 229 | -func (l *MiniBusinessLogic) CommentReply(conn transaction.Conn, articleId int64, sectionId int64, commentId int64, content string, at []int64) (err error) { | ||
| 230 | - return l.createMessage(conn, domain.MsgTypeReply, domain.OptTypeComment, articleId, sectionId, commentId, content, at) | 236 | +func (l *MiniBusinessLogic) CommentReply(conn transaction.Conn, articleId int64, commentId int64, commentParentId int64, at []int64) (err error) { |
| 237 | + return l.createMessage(conn, domain.MsgTypeReply, domain.OptTypeComment, articleId, commentId, commentParentId, at) | ||
| 231 | } | 238 | } |
| 232 | 239 | ||
| 233 | // LikeArticle 点赞文章 | 240 | // LikeArticle 点赞文章 |
| 234 | func (l *MiniBusinessLogic) LikeArticle(conn transaction.Conn, articleId int64, at int64) (err error) { | 241 | func (l *MiniBusinessLogic) LikeArticle(conn transaction.Conn, articleId int64, at int64) (err error) { |
| 235 | - return l.createMessage(conn, domain.MsgTypeLike, domain.OptTypeArticle, articleId, 0, 0, "", []int64{at}) | 242 | + return l.createMessage(conn, domain.MsgTypeLike, domain.OptTypeArticle, articleId, 0, 0, []int64{at}) |
| 236 | } | 243 | } |
| 237 | 244 | ||
| 238 | // LikeComment 点赞评论 | 245 | // LikeComment 点赞评论 |
| 239 | -func (l *MiniBusinessLogic) LikeComment(conn transaction.Conn, articleId int64, commentId int64, at int64) (err error) { | ||
| 240 | - return l.createMessage(conn, domain.MsgTypeLike, domain.OptTypeComment, articleId, 0, commentId, "", []int64{at}) | 246 | +func (l *MiniBusinessLogic) LikeComment(conn transaction.Conn, articleId int64, commentId int64, commentParentId int64, at int64) (err error) { |
| 247 | + return l.createMessage(conn, domain.MsgTypeLike, domain.OptTypeComment, articleId, commentId, commentParentId, []int64{at}) | ||
| 241 | } | 248 | } |
| 242 | 249 | ||
| 243 | // UnLikeArticle 取消点赞文章 | 250 | // UnLikeArticle 取消点赞文章 |
| @@ -255,9 +262,8 @@ func (l *MiniBusinessLogic) createMessage( | @@ -255,9 +262,8 @@ func (l *MiniBusinessLogic) createMessage( | ||
| 255 | msgType domain.MsgBusinessType, | 262 | msgType domain.MsgBusinessType, |
| 256 | optType domain.MsgBusinessOpt, | 263 | optType domain.MsgBusinessOpt, |
| 257 | articleId int64, | 264 | articleId int64, |
| 258 | - sectionId int64, | ||
| 259 | commentId int64, | 265 | commentId int64, |
| 260 | - content string, | 266 | + commentParentId int64, |
| 261 | at []int64) (err error) { | 267 | at []int64) (err error) { |
| 262 | 268 | ||
| 263 | var userToken = contextdata.GetUserTokenFromCtx(l.ctx) | 269 | var userToken = contextdata.GetUserTokenFromCtx(l.ctx) |
| @@ -270,9 +276,8 @@ func (l *MiniBusinessLogic) createMessage( | @@ -270,9 +276,8 @@ func (l *MiniBusinessLogic) createMessage( | ||
| 270 | UserId: userToken.UserId, | 276 | UserId: userToken.UserId, |
| 271 | RecipientId: at[i], | 277 | RecipientId: at[i], |
| 272 | ArticleId: articleId, | 278 | ArticleId: articleId, |
| 273 | - SectionId: sectionId, | ||
| 274 | CommentId: commentId, | 279 | CommentId: commentId, |
| 275 | - Content: content, | 280 | + CommentParentId: commentParentId, |
| 276 | } | 281 | } |
| 277 | msg, err = l.svcCtx.MessageBusinessRepository.Insert(l.ctx, conn, msg) | 282 | msg, err = l.svcCtx.MessageBusinessRepository.Insert(l.ctx, conn, msg) |
| 278 | if err != nil { | 283 | if err != nil { |
| @@ -109,9 +109,17 @@ func (l *MiniMyBeLikedLogic) NewItemSimple(love *domain.UserLoveFlag, company *d | @@ -109,9 +109,17 @@ func (l *MiniMyBeLikedLogic) NewItemSimple(love *domain.UserLoveFlag, company *d | ||
| 109 | item.Comment = &types.SimpleComment{ | 109 | item.Comment = &types.SimpleComment{ |
| 110 | Id: comment.Id, | 110 | Id: comment.Id, |
| 111 | Content: comment.Content, | 111 | Content: comment.Content, |
| 112 | - CountLove: comment.CountUserLove, | ||
| 113 | - CountComment: comment.CountReply, | ||
| 114 | Show: int(comment.Show), | 112 | Show: int(comment.Show), |
| 113 | + CountReply: comment.CountReply, | ||
| 114 | + CountUserLove: comment.CountUserLove, | ||
| 115 | + MatchUrl: comment.MatchUrl, | ||
| 116 | + } | ||
| 117 | + item.Comment.AtWho = make([]types.CommentAtWho, 0) | ||
| 118 | + for _, who := range comment.AtWho { | ||
| 119 | + item.Comment.AtWho = append(item.Comment.AtWho, types.CommentAtWho{ | ||
| 120 | + Id: who.Id, | ||
| 121 | + Name: who.Name, | ||
| 122 | + }) | ||
| 115 | } | 123 | } |
| 116 | } | 124 | } |
| 117 | 125 |
| @@ -109,9 +109,17 @@ func (l *MiniMyLikeLogic) NewItemSimple(love *domain.UserLoveFlag, company *doma | @@ -109,9 +109,17 @@ func (l *MiniMyLikeLogic) NewItemSimple(love *domain.UserLoveFlag, company *doma | ||
| 109 | item.Comment = &types.SimpleComment{ | 109 | item.Comment = &types.SimpleComment{ |
| 110 | Id: comment.Id, | 110 | Id: comment.Id, |
| 111 | Content: comment.Content, | 111 | Content: comment.Content, |
| 112 | - CountLove: comment.CountUserLove, | ||
| 113 | - CountComment: comment.CountReply, | ||
| 114 | Show: int(comment.Show), | 112 | Show: int(comment.Show), |
| 113 | + CountReply: comment.CountReply, | ||
| 114 | + CountUserLove: comment.CountUserLove, | ||
| 115 | + MatchUrl: comment.MatchUrl, | ||
| 116 | + } | ||
| 117 | + item.Comment.AtWho = make([]types.CommentAtWho, 0) | ||
| 118 | + for _, who := range comment.AtWho { | ||
| 119 | + item.Comment.AtWho = append(item.Comment.AtWho, types.CommentAtWho{ | ||
| 120 | + Id: who.Id, | ||
| 121 | + Name: who.Name, | ||
| 122 | + }) | ||
| 115 | } | 123 | } |
| 116 | } | 124 | } |
| 117 | 125 |
| @@ -10,6 +10,7 @@ type CommonSmsCodeResposne struct { | @@ -10,6 +10,7 @@ type CommonSmsCodeResposne struct { | ||
| 10 | 10 | ||
| 11 | type MiniQrCodeRequest struct { | 11 | type MiniQrCodeRequest struct { |
| 12 | Page string `json:"page"` // 微信页面入口 | 12 | Page string `json:"page"` // 微信页面入口 |
| 13 | + Path string `json:"path"` // | ||
| 13 | Scene string `json:"scene"` // 参数 | 14 | Scene string `json:"scene"` // 参数 |
| 14 | } | 15 | } |
| 15 | 16 | ||
| @@ -288,19 +289,16 @@ type MessageBusinessResponse struct { | @@ -288,19 +289,16 @@ type MessageBusinessResponse struct { | ||
| 288 | type MessageBusinessItem struct { | 289 | type MessageBusinessItem struct { |
| 289 | Id int64 `json:"id"` | 290 | Id int64 `json:"id"` |
| 290 | Type int `json:"type"` // 分类 (1回复 2点赞 3被采纳) | 291 | Type int `json:"type"` // 分类 (1回复 2点赞 3被采纳) |
| 291 | - OptType int `json:"optType"` // 操作类型(1针对文章、2针对评论、3针对圆桌) | 292 | + OptType int `json:"optType"` // 操作类型(1针对文章或段落、2针对评论、3针对圆桌) |
| 292 | CompanyId int64 `json:"companyId"` // 操作人公司ID | 293 | CompanyId int64 `json:"companyId"` // 操作人公司ID |
| 293 | UserId int64 `json:"userId"` // 操作人用户ID | 294 | UserId int64 `json:"userId"` // 操作人用户ID |
| 294 | RecipientId int64 `json:"recipientId"` // 接收者ID | 295 | RecipientId int64 `json:"recipientId"` // 接收者ID |
| 295 | ArticleId int64 `json:"articleId"` // 文章ID | 296 | ArticleId int64 `json:"articleId"` // 文章ID |
| 296 | - CommentId int64 `json:"commentId"` // 评论ID | ||
| 297 | - DiscussionId int64 `json:"discussionId"` // 圆桌ID | ||
| 298 | - DiscussionOpinionId int64 `json:"discussionOpinionId"` // 观点ID | ||
| 299 | - Content string `json:"content"` // 消息内容 | ||
| 300 | CreatedAt int64 `json:"createdAt"` // 创建时间 | 297 | CreatedAt int64 `json:"createdAt"` // 创建时间 |
| 301 | User *SimpleUser `json:"user"` // 操作人 | 298 | User *SimpleUser `json:"user"` // 操作人 |
| 302 | Article *SimpleArticle `json:"article"` // 文章 | 299 | Article *SimpleArticle `json:"article"` // 文章 |
| 303 | - Comment *SimpleComment `json:"comment"` // 评论(不一定是自己,可能是被人@到) | 300 | + Comment *SimpleComment `json:"comment"` // 评论 |
| 301 | + CommentParent *SimpleComment `json:"commentParent"` // 被回复的评论 | ||
| 304 | } | 302 | } |
| 305 | 303 | ||
| 306 | type SimpleUser struct { | 304 | type SimpleUser struct { |
| @@ -603,11 +601,11 @@ type MyLikeItem struct { | @@ -603,11 +601,11 @@ type MyLikeItem struct { | ||
| 603 | type SimpleComment struct { | 601 | type SimpleComment struct { |
| 604 | Id int64 `json:"id"` | 602 | Id int64 `json:"id"` |
| 605 | Content string `json:"content"` // 评论内容 | 603 | Content string `json:"content"` // 评论内容 |
| 606 | - CountLove int `json:"countLove"` // 点赞数量 | ||
| 607 | - CountComment int `json:"countComment"` // 评论数量 | ||
| 608 | Show int `json:"show"` // 评论的展示状态(0显示、1不显示) | 604 | Show int `json:"show"` // 评论的展示状态(0显示、1不显示) |
| 609 | - AtWho []SimpleUser `json:"atWho"` // @用户 | ||
| 610 | - MatchUrl map[string]string `json:"matchUrl"` // 内容中的url文本 | 605 | + AtWho []CommentAtWho `json:"atWho"` // 填写评论时@的人 |
| 606 | + MatchUrl map[string]string `json:"matchUrl"` // 评论内容中的url文本 | ||
| 607 | + CountReply int `json:"countReply"` // 用户回复数量 | ||
| 608 | + CountUserLove int `json:"countUserLove"` // 用户点赞数量 | ||
| 611 | } | 609 | } |
| 612 | 610 | ||
| 613 | type MiniBeLikedRequest struct { | 611 | type MiniBeLikedRequest struct { |
| @@ -16,10 +16,9 @@ type MessageBusiness struct { | @@ -16,10 +16,9 @@ type MessageBusiness struct { | ||
| 16 | CompanyId int64 `json:"companyId"` // 操作人公司ID | 16 | CompanyId int64 `json:"companyId"` // 操作人公司ID |
| 17 | UserId int64 `json:"userId"` // 操作人用户ID | 17 | UserId int64 `json:"userId"` // 操作人用户ID |
| 18 | RecipientId int64 `json:"recipientId"` // 接收人用户ID | 18 | RecipientId int64 `json:"recipientId"` // 接收人用户ID |
| 19 | - ArticleId int64 `json:"articleId,omitempty"` // 文章ID | ||
| 20 | - SectionId int64 `json:"sectionId,omitempty"` // 段落ID | ||
| 21 | - CommentId int64 `json:"commentId,omitempty"` // 评论ID | ||
| 22 | - Content string `json:"content,omitempty"` // 消息内容 | 19 | + ArticleId int64 `json:"articleId"` // 文章ID |
| 20 | + CommentId int64 `json:"commentId"` // 评论来源ID | ||
| 21 | + CommentParentId int64 `json:"commentParentId"` // 评论上级ID | ||
| 23 | CreatedAt int64 `json:",omitempty"` | 22 | CreatedAt int64 `json:",omitempty"` |
| 24 | UpdatedAt int64 `json:",omitempty"` | 23 | UpdatedAt int64 `json:",omitempty"` |
| 25 | DeletedAt int64 `json:",omitempty"` | 24 | DeletedAt int64 `json:",omitempty"` |
| @@ -8,19 +8,20 @@ import ( | @@ -8,19 +8,20 @@ import ( | ||
| 8 | type MessageBusiness struct { | 8 | type MessageBusiness struct { |
| 9 | Id int64 // 唯一标识 | 9 | Id int64 // 唯一标识 |
| 10 | Type MsgBusinessType `json:"type"` // 分类 (1回复 2点赞 3被采纳) | 10 | Type MsgBusinessType `json:"type"` // 分类 (1回复 2点赞 3被采纳) |
| 11 | - OptType MsgBusinessOpt `json:"optType"` // 操作类型(1针对文章、2针对评论、3针对圆桌) | 11 | + OptType MsgBusinessOpt `json:"optType"` // 操作类型(1针对文章或段落、2针对评论、3针对圆桌) |
| 12 | CompanyId int64 `json:"companyId"` // 操作人公司ID | 12 | CompanyId int64 `json:"companyId"` // 操作人公司ID |
| 13 | UserId int64 `json:"userId"` // 操作人用户ID | 13 | UserId int64 `json:"userId"` // 操作人用户ID |
| 14 | RecipientId int64 `json:"recipientId"` // 接收人用户ID | 14 | RecipientId int64 `json:"recipientId"` // 接收人用户ID |
| 15 | ArticleId int64 `json:"articleId"` // 文章ID | 15 | ArticleId int64 `json:"articleId"` // 文章ID |
| 16 | - SectionId int64 `json:"sectionId"` // 段落ID | ||
| 17 | - CommentId int64 `json:"commentId"` // 评论ID | ||
| 18 | - Content string `json:"content"` // 消息内容 | 16 | + CommentId int64 `json:"commentId"` // 评论来源ID |
| 17 | + CommentParentId int64 `json:"commentParentId"` // 评论上级ID | ||
| 19 | CreatedAt int64 `json:",omitempty"` | 18 | CreatedAt int64 `json:",omitempty"` |
| 20 | UpdatedAt int64 `json:",omitempty"` | 19 | UpdatedAt int64 `json:",omitempty"` |
| 21 | DeletedAt int64 `json:",omitempty"` | 20 | DeletedAt int64 `json:",omitempty"` |
| 22 | Version int `json:",omitempty"` | 21 | Version int `json:",omitempty"` |
| 23 | 22 | ||
| 23 | + //SectionId int64 `json:"sectionId"` // 段落ID | ||
| 24 | + //Content string `json:"content"` // 消息内容 | ||
| 24 | //DiscussionId int64 `json:"discussionId"` // 圆桌ID | 25 | //DiscussionId int64 `json:"discussionId"` // 圆桌ID |
| 25 | //DiscussionOpinionId int64 `json:"discussionOpinionId"` // 观点ID | 26 | //DiscussionOpinionId int64 `json:"discussionOpinionId"` // 观点ID |
| 26 | } | 27 | } |
| @@ -15,8 +15,8 @@ type UserLoveFlag struct { | @@ -15,8 +15,8 @@ type UserLoveFlag struct { | ||
| 15 | CommentId int64 `json:"commentId"` // 点赞评论时,填评论id | 15 | CommentId int64 `json:"commentId"` // 点赞评论时,填评论id |
| 16 | CommentAuthor int64 `json:"commentAuthor"` // 评论的填写人 | 16 | CommentAuthor int64 `json:"commentAuthor"` // 评论的填写人 |
| 17 | ToUserId int64 `json:"toUserId"` // 点赞的接受人 | 17 | ToUserId int64 `json:"toUserId"` // 点赞的接受人 |
| 18 | - UserId int64 `json:"userId"` // 点赞的人 | ||
| 19 | - CompanyId int64 `json:"companyId"` // | 18 | + UserId int64 `json:"userId"` // 点赞人 |
| 19 | + CompanyId int64 `json:"companyId"` // 点赞人的公司 | ||
| 20 | CreatedAt int64 `json:"createdAt,omitempty"` | 20 | CreatedAt int64 `json:"createdAt,omitempty"` |
| 21 | UpdatedAt int64 `json:"updatedAt,omitempty"` | 21 | UpdatedAt int64 `json:"updatedAt,omitempty"` |
| 22 | DeletedAt int64 `json:"deletedAt,omitempty"` | 22 | DeletedAt int64 `json:"deletedAt,omitempty"` |
-
请 注册 或 登录 后发表评论