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.

56 lines
2.3 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. "github.com/gogf/gf/v2/net/ghttp"
  12. )
  13. type (
  14. ICouponUsers interface {
  15. // 根据优惠券id查看拥有优惠券的用户
  16. GetCouponUsersByCondition(ctx context.Context, couponId int, jwcode int, name string, pageNo int, pageSize int) (users []couponusers.GetCouponUsersRes, err error)
  17. // 根据jwcode,优惠券id删除用户
  18. DeleteCouponUserByJwcode(ctx context.Context, couponId int, jwcode int) (result sql.Result, err error)
  19. // 通过excel导入精网号
  20. InsertJwcodeByExcel(ctx context.Context, file multipart.File, couponId int) (num int, err error)
  21. // 传来jwcodes字符串,解析并发放卡券
  22. InsertCouponUsersByJwcodeStr(ctx context.Context, jwcodeStr string, couponId int) (num int, err error)
  23. // 根据精网号发放用户优惠券,群发 //不被controller层调用了,但不能删除
  24. InsertCouponUsersByJwcodes(ctx context.Context, jwcodes []int, couponId int) (num int, err error)
  25. // 导入满足条件的用户jwcode到redis //不上传到redis了,上传到数据库表,到时候直接从表里查
  26. InsertJwcodesToRedisByExcel(file multipart.File) (err error)
  27. // 判断某用户能否抽到卡券
  28. IsEligibleUser(ctx context.Context, jwcode int, couponIds []int) (img string, err error)
  29. // 给单个用户发放卡券
  30. IssueCouponToUser(ctx context.Context, jwcode int, couponId int) (err error)
  31. /*未编写*/
  32. // 导出拥有卡券的用户列表
  33. ExportCouponUsers(r *ghttp.Request, couponId int, jwcode int, name string, pageNo int, pageSize int)
  34. // 添加用户选择武器记录
  35. AddRecord(ctx context.Context, jwcode int, id int, name string) (err error)
  36. }
  37. )
  38. var (
  39. localCouponUsers ICouponUsers
  40. )
  41. func CouponUsers() ICouponUsers {
  42. if localCouponUsers == nil {
  43. panic("implement not found for interface ICouponUsers, forgot register?")
  44. }
  45. return localCouponUsers
  46. }
  47. func RegisterCouponUsers(i ICouponUsers) {
  48. localCouponUsers = i
  49. }