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.

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