Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 85cdb58

Browse files
committed
bugfix
1 parent 26f3676 commit 85cdb58

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/logic/article.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ func (self ArticleComment) SetObjinfo(ids []int, commentMap map[int][]*model.Com
10931093
}
10941094

10951095
for _, article := range articles {
1096-
if article.Status < model.ArticleStatusOffline {
1096+
if article.Status >= model.ArticleStatusOffline {
10971097
continue
10981098
}
10991099
objinfo := make(map[string]interface{})

src/logic/comment.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,10 @@ func (CommentLogic) Count(ctx context.Context, querystring string, args ...inter
444444

445445
func (CommentLogic) filterDelObjectCmt(comments []*model.Comment) []*model.Comment {
446446
resultCmts := make([]*model.Comment, 0, len(comments))
447+
fmt.Println("comments len:", len(comments))
447448
for _, comment := range comments {
448449
if comment.Objinfo != nil && len(comment.Objinfo) > 0 {
450+
fmt.Println("result len:", len(resultCmts))
449451
resultCmts = append(resultCmts, comment)
450452
}
451453
}

0 commit comments

Comments
 (0)