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.

50 lines
1.8 KiB

  1. // ================================================================================
  2. // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
  3. // You can delete these comments if you wish manually maintain this interface file.
  4. // ================================================================================
  5. package service
  6. import (
  7. "CouponBackendGo/api/v1/couponusers"
  8. "context"
  9. "database/sql"
  10. "mime/multipart"
  11. )
  12. type (
  13. ICouponUsers interface {
  14. // 根据优惠券id查看拥有优惠券的用户
  15. GetCouponUsersByCondition(ctx context.Context, couponId int, jwcode int, name string, pageNo int, pageSize int) (users []couponusers.GetCouponUsersRes, err error)
  16. // 根据jwcode,优惠券id删除用户
  17. DeleteCouponUserByJwcode(ctx context.Context, couponId int, jwcode int) (result sql.Result, err error)
  18. // 通过excel导入精网号
  19. InsertJwcodeByExcel(file multipart.File) (jwcodes []int, err error)
  20. // 根据精网号发放用户优惠券
  21. InsertCouponUsersByJwcodes(ctx context.Context, jwcodes []int, couponId int) (num int, err error)
  22. // 导入满足条件的用户jwcode到redis //不上传到redis了,上传到数据库表,到时候直接从表里查
  23. InsertJwcodesToRedisByExcel(file multipart.File) (err error)
  24. // 判断某用户能否抽到卡券
  25. IsEligibleUser(ctx context.Context, jwcode int, couponIds []int) (img string, err error)
  26. // 给单个用户发放卡券
  27. IssueCouponToUser(ctx context.Context, jwcode int, couponId int) (err error)
  28. /*未编写*/
  29. // 导出拥有卡券的用户列表
  30. ExportCouponUsers()
  31. }
  32. )
  33. var (
  34. localCouponUsers ICouponUsers
  35. )
  36. func CouponUsers() ICouponUsers {
  37. if localCouponUsers == nil {
  38. panic("implement not found for interface ICouponUsers, forgot register?")
  39. }
  40. return localCouponUsers
  41. }
  42. func RegisterCouponUsers(i ICouponUsers) {
  43. localCouponUsers = i
  44. }