Documentation ¶
Index ¶
- type ReviewRepo
- type ReviewService
- func (cs *ReviewService) AddAnswerReview(ctx context.Context, answer *entity.Answer, ip, ua string) (answerStatus int)
- func (cs *ReviewService) AddQuestionReview(ctx context.Context, question *entity.Question, tags []*schema.TagItem, ...) (questionStatus int)
- func (cs *ReviewService) GetReviewPendingCount(ctx context.Context) (count int64, err error)
- func (cs *ReviewService) GetUnreviewedPostPage(ctx context.Context, req *schema.GetUnreviewedPostPageReq) (pageModel *pager.PageModel, err error)
- func (cs *ReviewService) UpdateReview(ctx context.Context, req *schema.UpdateReviewReq) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReviewRepo ¶
type ReviewRepo interface { AddReview(ctx context.Context, review *entity.Review) (err error) UpdateReviewStatus(ctx context.Context, reviewID int, reviewerUserID string, status int) (err error) GetReview(ctx context.Context, reviewID int) (review *entity.Review, exist bool, err error) GetReviewCount(ctx context.Context, status int) (count int64, err error) GetReviewPage(ctx context.Context, page, pageSize int, cond *entity.Review) (reviewList []*entity.Review, total int64, err error) }
ReviewRepo review repository
type ReviewService ¶
type ReviewService struct {
// contains filtered or unexported fields
}
ReviewService user service
func NewReviewService ¶
func NewReviewService( reviewRepo ReviewRepo, objectInfoService *object_info.ObjService, userCommon *usercommon.UserCommon, userRepo usercommon.UserRepo, questionRepo questioncommon.QuestionRepo, answerRepo answercommon.AnswerRepo, userRoleService *role.UserRoleRelService, externalNotificationQueueService notice_queue.ExternalNotificationQueueService, tagCommon *tagcommon.TagCommonService, questionCommon *questioncommon.QuestionCommon, notificationQueueService notice_queue.NotificationQueueService, siteInfoService siteinfo_common.SiteInfoCommonService, ) *ReviewService
NewReviewService new review service
func (*ReviewService) AddAnswerReview ¶
func (cs *ReviewService) AddAnswerReview(ctx context.Context, answer *entity.Answer, ip, ua string) (answerStatus int)
AddAnswerReview add review for answer if needed
func (*ReviewService) AddQuestionReview ¶
func (cs *ReviewService) AddQuestionReview(ctx context.Context, question *entity.Question, tags []*schema.TagItem, ip, ua string) (questionStatus int)
AddQuestionReview add review for question if needed
func (*ReviewService) GetReviewPendingCount ¶
func (cs *ReviewService) GetReviewPendingCount(ctx context.Context) (count int64, err error)
GetReviewPendingCount get review pending count
func (*ReviewService) GetUnreviewedPostPage ¶
func (cs *ReviewService) GetUnreviewedPostPage(ctx context.Context, req *schema.GetUnreviewedPostPageReq) ( pageModel *pager.PageModel, err error)
GetUnreviewedPostPage get review page
func (*ReviewService) UpdateReview ¶
func (cs *ReviewService) UpdateReview(ctx context.Context, req *schema.UpdateReviewReq) (err error)
UpdateReview update review
Click to show internal directories.
Click to hide internal directories.