(dao dao.CommentDAO, cache cache.CommentCache)
| 29 | } |
| 30 | |
| 31 | func NewCommentRepository(dao dao.CommentDAO, cache cache.CommentCache) CommentRepository { |
| 32 | return &commentRepository{ |
| 33 | dao: dao, |
| 34 | cache: cache, |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | // CreateComment 创建评论 |
| 39 | func (c *commentRepository) CreateComment(ctx context.Context, comment domain.Comment) (int64, error) { |