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.
 
 
 

45 lines
1.5 KiB

// ================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================
package service
import (
"CouponBackendGo/api/v1/couponusers"
"context"
"database/sql"
"mime/multipart"
)
type (
ICouponUsers interface {
// 根据优惠券id查看拥有优惠券的用户
GetCouponUsersByCondition(ctx context.Context, couponId int, jwcode int, name string) (users []couponusers.GetCouponUsersRes, err error)
// 根据jwcode,优惠券id删除用户
DeleteCouponUserByJwcode(ctx context.Context, couponId int, jwcode int) (result sql.Result, err error)
// 通过excel导入精网号
InsertJwcodeByExcel(file multipart.File) (jwcodes []int, err error)
// 根据精网号发放用户优惠券
InsertCouponUsersByJwcodes(ctx context.Context, jwcodes []int, couponId int) (num int, err error)
// 导入满足条件的用户jwcode到redis
InsertJwcodesToRedisByExcel(file multipart.File) (err error)
// 给单个用户发放卡券
IssueCouponToUser(ctx context.Context, jwcode int, couponId int) (err error)
}
)
var (
localCouponUsers ICouponUsers
)
func CouponUsers() ICouponUsers {
if localCouponUsers == nil {
panic("implement not found for interface ICouponUsers, forgot register?")
}
return localCouponUsers
}
func RegisterCouponUsers(i ICouponUsers) {
localCouponUsers = i
}