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.

52 lines
2.1 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(ctx context.Context, file multipart.File, couponId int) (num int, err error)
  20. // 传来jwcodes字符串,解析并发放卡券
  21. InsertCouponUsersByJwcodeStr(ctx context.Context, jwcodeStr string, couponId int) (num int, err error)
  22. // 根据精网号发放用户优惠券,群发 //不被controller层调用了,但不能删除
  23. InsertCouponUsersByJwcodes(ctx context.Context, jwcodes []int, couponId int) (num int, err error)
  24. // 导入满足条件的用户jwcode到redis //不上传到redis了,上传到数据库表,到时候直接从表里查
  25. InsertJwcodesToRedisByExcel(file multipart.File) (err error)
  26. // 判断某用户能否抽到卡券
  27. IsEligibleUser(ctx context.Context, jwcode int, couponIds []int) (img string, err error)
  28. // 给单个用户发放卡券
  29. IssueCouponToUser(ctx context.Context, jwcode int, couponId int) (err error)
  30. /*未编写*/
  31. // 导出拥有卡券的用户列表
  32. ExportCouponUsers()
  33. }
  34. )
  35. var (
  36. localCouponUsers ICouponUsers
  37. )
  38. func CouponUsers() ICouponUsers {
  39. if localCouponUsers == nil {
  40. panic("implement not found for interface ICouponUsers, forgot register?")
  41. }
  42. return localCouponUsers
  43. }
  44. func RegisterCouponUsers(i ICouponUsers) {
  45. localCouponUsers = i
  46. }