作者 tangxvhui

Merge branch 'dev' into test

@@ -254,14 +254,14 @@ type ( @@ -254,14 +254,14 @@ type (
254 // 文章里的评论列表 254 // 文章里的评论列表
255 type ( 255 type (
256 SystemArticleCommentSearchRequest { 256 SystemArticleCommentSearchRequest {
257 - Page int `json:"page"`  
258 - Size int `json:"size"`  
259 - ArticleId int64 `json:"articleId"` // 文章ID  
260 - TopId int64 `json:"topId,optional"` // 文章顶层ID  
261 - Author int64 `json:"author,optional"` // 用户  
262 - Show int `json:"show,optional"` // 显示状态  
263 - BeginTime int64 `json:"beginTime,optional"` // 开始时间  
264 - EndTime int64 `json:"endTime,optional"` // 结束时间 257 + Page int `json:"page"`
  258 + Size int `json:"size"`
  259 + ArticleId int64 `json:"articleId"` // 文章ID
  260 + TopId int64 `json:"topId,optional"` // 文章顶层ID
  261 + Author int64 `json:"author,optional"` // 用户
  262 + Show int `json:"show,optional"` // 显示状态
  263 + BeginTime int64 `json:"beginTime,optional"` // 开始时间
  264 + EndTime int64 `json:"endTime,optional"` // 结束时间
265 } 265 }
266 SystemArticleCommentSearchResponse { 266 SystemArticleCommentSearchResponse {
267 Total int64 `json:"total"` 267 Total int64 `json:"total"`
@@ -362,10 +362,11 @@ type ( @@ -362,10 +362,11 @@ type (
362 // 管理后台变更评论 362 // 管理后台变更评论
363 type ( 363 type (
364 SystemEditCommentRequest { 364 SystemEditCommentRequest {
365 - CompanyId int64 `json:",optional"`  
366 - Id int64 `json:"id"`  
367 - Show int `json:"show"` //[1 显示评论] [2: 隐藏评论]  
368 - CountAdminLove int `json:"countAdminLove,optional"` 365 + CompanyId int64 `json:",optional"`
  366 + Id int64 `json:"id"`
  367 + Show int `json:"show"` //[1 显示评论] [2: 隐藏评论]
  368 + Content string `json:"content,optional"`
  369 + CountAdminLove int `json:"countAdminLove,optional"`
369 } 370 }
370 371
371 SystemEditCommentResponse { 372 SystemEditCommentResponse {
@@ -37,6 +37,7 @@ func (l *SystemEditAticleCommentLogic) SystemEditAticleComment(req *types.System @@ -37,6 +37,7 @@ func (l *SystemEditAticleCommentLogic) SystemEditAticleComment(req *types.System
37 return nil, xerr.NewErrMsg("没有操作权限") 37 return nil, xerr.NewErrMsg("没有操作权限")
38 } 38 }
39 commetInfo.CountAdminLove = req.CountAdminLove 39 commetInfo.CountAdminLove = req.CountAdminLove
  40 + commetInfo.Content = req.Content
40 var increaseCount int 41 var increaseCount int
41 switch req.Show { 42 switch req.Show {
42 case 1: 43 case 1:
@@ -52,7 +53,7 @@ func (l *SystemEditAticleCommentLogic) SystemEditAticleComment(req *types.System @@ -52,7 +53,7 @@ func (l *SystemEditAticleCommentLogic) SystemEditAticleComment(req *types.System
52 increaseCount = -1 53 increaseCount = -1
53 } 54 }
54 } 55 }
55 - commetInfo.Show = domain.CommentShowEnable 56 +
56 // 变更回复数量 57 // 变更回复数量
57 err = transaction.UseTrans(l.ctx, conn.DB(), func(ctx context.Context, c transaction.Conn) error { 58 err = transaction.UseTrans(l.ctx, conn.DB(), func(ctx context.Context, c transaction.Conn) error {
58 _, err = l.svcCtx.ArticleCommentRepository.Update(ctx, c, commetInfo) 59 _, err = l.svcCtx.ArticleCommentRepository.Update(ctx, c, commetInfo)
@@ -265,10 +265,11 @@ type SystemEditCommentShowResponse struct { @@ -265,10 +265,11 @@ type SystemEditCommentShowResponse struct {
265 } 265 }
266 266
267 type SystemEditCommentRequest struct { 267 type SystemEditCommentRequest struct {
268 - CompanyId int64 `json:",optional"`  
269 - Id int64 `json:"id"`  
270 - Show int `json:"show"` //[1 显示评论] [2: 隐藏评论]  
271 - CountAdminLove int `json:"countAdminLove,optional"` 268 + CompanyId int64 `json:",optional"`
  269 + Id int64 `json:"id"`
  270 + Show int `json:"show"` //[1 显示评论] [2: 隐藏评论]
  271 + Content string `json:"content,optional"`
  272 + CountAdminLove int `json:"countAdminLove,optional"`
272 } 273 }
273 274
274 type SystemEditCommentResponse struct { 275 type SystemEditCommentResponse struct {