作者 郑周

1. 消息的 显示状态 优化

... ... @@ -64,7 +64,7 @@ type (
CreatedAt int64 `json:"createdAt"` // 创建时间
User *SimpleUser `json:"user"` // 操作人
Article *SimpleArticle `json:"article"` // 文章
Comment *Comment `json:"comment"` // 评论(不一定是自己,可能是被人@到)
Comment *SimpleComment `json:"comment"` // 评论(不一定是自己,可能是被人@到)
}
SimpleUser {
... ... @@ -82,5 +82,6 @@ type (
Title string `json:"title"` // 文章标题
CountLove int `json:"countLove"` // 点赞数量
CountComment int `json:"countComment"` // 评论数量
Show int `json:"show"` // 文章的展示状态(0显示、1不显示)
}
)
... ...
... ... @@ -184,6 +184,7 @@ type (
Content string `json:"content"` // 评论内容
CountLove int `json:"countLove"` // 点赞数量
CountComment int `json:"countComment"` // 评论数量
Show int `json:"show"` // 评论的展示状态(0显示、1不显示)
}
)
... ...
... ... @@ -188,11 +188,12 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageBusinessRequest) (res
Title: v.Title,
CountLove: v.CountLove,
CountComment: v.CountComment,
Show: int(v.Show),
}
}
if _, ok := commentIdMap[item.CommentId]; ok {
to.Comment = &types.Comment{
to.Comment = &types.SimpleComment{
//Id: v.Id,
//Title: v.Title,
//CountLove: v.CountLove,
... ...
... ... @@ -94,6 +94,7 @@ func NewItemSimple(love *domain.UserLoveFlag, user *domain.User, article *domain
Title: article.Title,
CountLove: article.CountLove,
CountComment: article.CountComment,
Show: int(article.Show),
}
}
... ...
... ... @@ -55,7 +55,7 @@ type MessageBusinessItem struct {
CreatedAt int64 `json:"createdAt"` // 创建时间
User *SimpleUser `json:"user"` // 操作人
Article *SimpleArticle `json:"article"` // 文章
Comment *Comment `json:"comment"` // 评论(不一定是自己,可能是被人@到)
Comment *SimpleComment `json:"comment"` // 评论(不一定是自己,可能是被人@到)
}
type SimpleUser struct {
... ... @@ -72,6 +72,7 @@ type SimpleArticle struct {
Title string `json:"title"` // 文章标题
CountLove int `json:"countLove"` // 点赞数量
CountComment int `json:"countComment"` // 评论数量
Show int `json:"show"` // 文章的展示状态(0显示、1不显示)
}
type TagCreateRequest struct {
... ... @@ -276,6 +277,7 @@ type SimpleComment struct {
Content string `json:"content"` // 评论内容
CountLove int `json:"countLove"` // 点赞数量
CountComment int `json:"countComment"` // 评论数量
Show int `json:"show"` // 评论的展示状态(0显示、1不显示)
}
type CompanySearchRequest struct {
... ...