You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
766 B

  1. package service
  2. import (
  3. "VoteManage_Go/api/v1/vote"
  4. "VoteManage_Go/internal/model/dto"
  5. "context"
  6. "github.com/gogf/gf/v2/net/ghttp"
  7. )
  8. type (
  9. IVote interface {
  10. //条件筛选
  11. GetVoteByCondition(ctx context.Context, req *vote.GetVoteDetailListReq) (votes []*dto.VoteDto, total int, err error)
  12. // 导出拥有卡券的用户列表
  13. ExportVote(r *ghttp.Request, req *vote.GetVoteDetailListReq)
  14. // 投票活动列表
  15. GetActivityList(ctx context.Context, req *vote.GetActivityListReq) (activityList []*dto.Activity, total int, err error)
  16. }
  17. )
  18. var (
  19. localVote IVote
  20. )
  21. func Vote() IVote {
  22. if localVote == nil {
  23. panic("implement not found for interface ICoupon, forgot register?")
  24. }
  25. return localVote
  26. }
  27. func RegisterVote(i IVote) {
  28. localVote = i
  29. }