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.

51 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
  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. ExportCouponUsers()
  30. // 添加用户选择武器记录
  31. AddRecord(ctx context.Context, jwcode int, id int, name string) (err error)
  32. }
  33. )
  34. var (
  35. localCouponUsers ICouponUsers
  36. )
  37. func CouponUsers() ICouponUsers {
  38. if localCouponUsers == nil {
  39. panic("implement not found for interface ICouponUsers, forgot register?")
  40. }
  41. return localCouponUsers
  42. }
  43. func RegisterCouponUsers(i ICouponUsers) {
  44. localCouponUsers = i
  45. }