作者 郑周

1. 消息的 显示状态 优化

@@ -64,7 +64,7 @@ type ( @@ -64,7 +64,7 @@ type (
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 *Comment `json:"comment"` // 评论(不一定是自己,可能是被人@到) 67 + Comment *SimpleComment `json:"comment"` // 评论(不一定是自己,可能是被人@到)
68 } 68 }
69 69
70 SimpleUser { 70 SimpleUser {
@@ -82,5 +82,6 @@ type ( @@ -82,5 +82,6 @@ type (
82 Title string `json:"title"` // 文章标题 82 Title string `json:"title"` // 文章标题
83 CountLove int `json:"countLove"` // 点赞数量 83 CountLove int `json:"countLove"` // 点赞数量
84 CountComment int `json:"countComment"` // 评论数量 84 CountComment int `json:"countComment"` // 评论数量
  85 + Show int `json:"show"` // 文章的展示状态(0显示、1不显示)
85 } 86 }
86 ) 87 )
@@ -184,6 +184,7 @@ type ( @@ -184,6 +184,7 @@ type (
184 Content string `json:"content"` // 评论内容 184 Content string `json:"content"` // 评论内容
185 CountLove int `json:"countLove"` // 点赞数量 185 CountLove int `json:"countLove"` // 点赞数量
186 CountComment int `json:"countComment"` // 评论数量 186 CountComment int `json:"countComment"` // 评论数量
  187 + Show int `json:"show"` // 评论的展示状态(0显示、1不显示)
187 } 188 }
188 ) 189 )
189 190
@@ -188,11 +188,12 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageBusinessRequest) (res @@ -188,11 +188,12 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageBusinessRequest) (res
188 Title: v.Title, 188 Title: v.Title,
189 CountLove: v.CountLove, 189 CountLove: v.CountLove,
190 CountComment: v.CountComment, 190 CountComment: v.CountComment,
  191 + Show: int(v.Show),
191 } 192 }
192 } 193 }
193 194
194 if _, ok := commentIdMap[item.CommentId]; ok { 195 if _, ok := commentIdMap[item.CommentId]; ok {
195 - to.Comment = &types.Comment{ 196 + to.Comment = &types.SimpleComment{
196 //Id: v.Id, 197 //Id: v.Id,
197 //Title: v.Title, 198 //Title: v.Title,
198 //CountLove: v.CountLove, 199 //CountLove: v.CountLove,
@@ -94,6 +94,7 @@ func NewItemSimple(love *domain.UserLoveFlag, user *domain.User, article *domain @@ -94,6 +94,7 @@ func NewItemSimple(love *domain.UserLoveFlag, user *domain.User, article *domain
94 Title: article.Title, 94 Title: article.Title,
95 CountLove: article.CountLove, 95 CountLove: article.CountLove,
96 CountComment: article.CountComment, 96 CountComment: article.CountComment,
  97 + Show: int(article.Show),
97 } 98 }
98 } 99 }
99 100
@@ -55,7 +55,7 @@ type MessageBusinessItem struct { @@ -55,7 +55,7 @@ type MessageBusinessItem struct {
55 CreatedAt int64 `json:"createdAt"` // 创建时间 55 CreatedAt int64 `json:"createdAt"` // 创建时间
56 User *SimpleUser `json:"user"` // 操作人 56 User *SimpleUser `json:"user"` // 操作人
57 Article *SimpleArticle `json:"article"` // 文章 57 Article *SimpleArticle `json:"article"` // 文章
58 - Comment *Comment `json:"comment"` // 评论(不一定是自己,可能是被人@到) 58 + Comment *SimpleComment `json:"comment"` // 评论(不一定是自己,可能是被人@到)
59 } 59 }
60 60
61 type SimpleUser struct { 61 type SimpleUser struct {
@@ -72,6 +72,7 @@ type SimpleArticle struct { @@ -72,6 +72,7 @@ type SimpleArticle struct {
72 Title string `json:"title"` // 文章标题 72 Title string `json:"title"` // 文章标题
73 CountLove int `json:"countLove"` // 点赞数量 73 CountLove int `json:"countLove"` // 点赞数量
74 CountComment int `json:"countComment"` // 评论数量 74 CountComment int `json:"countComment"` // 评论数量
  75 + Show int `json:"show"` // 文章的展示状态(0显示、1不显示)
75 } 76 }
76 77
77 type TagCreateRequest struct { 78 type TagCreateRequest struct {
@@ -276,6 +277,7 @@ type SimpleComment struct { @@ -276,6 +277,7 @@ type SimpleComment struct {
276 Content string `json:"content"` // 评论内容 277 Content string `json:"content"` // 评论内容
277 CountLove int `json:"countLove"` // 点赞数量 278 CountLove int `json:"countLove"` // 点赞数量
278 CountComment int `json:"countComment"` // 评论数量 279 CountComment int `json:"countComment"` // 评论数量
  280 + Show int `json:"show"` // 评论的展示状态(0显示、1不显示)
279 } 281 }
280 282
281 type CompanySearchRequest struct { 283 type CompanySearchRequest struct {