...
|
...
|
@@ -444,7 +444,7 @@ func (repository *ArticleCommentRepository) CommentUserCount(ctx context.Context |
|
|
tx = conn.DB()
|
|
|
c int64
|
|
|
)
|
|
|
err = tx.Model(&models.ArticleComment{}).Where("company_id = ? and article_id = ?", companyId, articleId).Group("user_id").Count(&c).Error
|
|
|
err = tx.Model(&models.ArticleComment{}).Where("company_id = ? and article_id = ?", companyId, articleId).Group("from_user_id").Count(&c).Error
|
|
|
return c, err
|
|
|
}
|
|
|
|
...
|
...
|
@@ -455,7 +455,7 @@ func (repository *ArticleCommentRepository) ReplyUserCount(ctx context.Context, |
|
|
tx = conn.DB()
|
|
|
c int64
|
|
|
)
|
|
|
err = tx.Model(&models.ArticleComment{}).Where("company_id = ? and pid = ?", companyId, commentId).Group("user_id").Count(&c).Error
|
|
|
err = tx.Model(&models.ArticleComment{}).Where("company_id = ? and pid = ?", companyId, commentId).Group("from_user_id").Count(&c).Error
|
|
|
return c, err
|
|
|
}
|
|
|
|
...
|
...
|
|