Documentation ¶
Overview ¶
semver Drone CI SourceGraph
Package coupon 优惠券包 @since 0.0.4
Index ¶
- func APIGETCloseCoupon(c *gin.Context)
- func APIGETCoupon(c *gin.Context)
- func APIGETCouponLogs(c *gin.Context)
- func APIGETCoupons(c *gin.Context)
- func APIPOSTCoupon(c *gin.Context)
- func APIPUTCoupon(c *gin.Context)
- func APITableGETCoupons(c *gin.Context)
- func APITableGETCouponsLog(c *gin.Context)
- func APITableGETCouponsed(c *gin.Context)
- func CLoseCoupon(id uint64) error
- func GETCouponLogs(uid uint64) (*[]model.DBCouponLog, error)
- func GETCoupons(uid uint64) (*[]model.DBCoupon, error)
- func GETList(c *gin.Context)
- func GETUsedList(c *gin.Context)
- func GetUsedList() (*[]model.DBCouponLog, error)
- func PUTCoupon(couponID uint64) (int64, error)
- func PostCoupon(uid uint64, code string, title string, excerpt string, desc string, ...) error
- func Register()
- type APIGETCloseCouponForm
- type APIGETCouponsForm
- type APIPOSTCouponForm
- type APIPUTCouponsForm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIGETCloseCoupon ¶ added in v0.0.10
APIGETCloseCoupon @since 0.0.9 关闭优惠券
func APIGETCoupon ¶ added in v0.0.7
APIGETCoupon 获取优惠券信息 带用户信息 @since 0.0.6
func APIGETCouponLogs ¶
APIGETCouponLogs 查看卡券使用明细 @since 0.0.4
func APITableGETCoupons ¶
APITableGETCoupons 作死一下 @since 0.0.4 尝试自己完成 @since 0.0.9 这里跟管理员权限没关系 关闭的优惠券不现实 你看作死了把 自己实现的没有实现扫码核销的功能
func APITableGETCouponsLog ¶ added in v0.0.11
TODO 鬼畜代码 尽快想办法合并掉
func APITableGETCouponsed ¶
APITableGETCoupons 用于后台获取列表值的方法 @since 0.0.4
func CLoseCoupon ¶ added in v0.0.10
CLoseCoupon @since 0.0.9 关闭优惠券
func GETCouponLogs ¶
func GETCouponLogs(uid uint64) (*[]model.DBCouponLog, error)
GETCouponLogs 获取用户的优惠券使用记录 @since 0.0.4
func GETCoupons ¶
GETCoupons 用于程序内部调用 @since 0.0.4
func GetUsedList ¶ added in v0.0.11
func GetUsedList() (*[]model.DBCouponLog, error)
GetUsedList 获取使用记录
func PUTCoupon ¶
PUTCoupon 修改优惠券 @since 0.0.4 @since 0.0.8 如果使用次数达到上限则顺手关闭 @since 0.0.10 如果当日使用过则不允许在此使用
Types ¶
type APIGETCloseCouponForm ¶ added in v0.0.10
type APIGETCloseCouponForm struct {
ID uint64 `form:"id" binding:"required"`
}
type APIGETCouponsForm ¶
type APIGETCouponsForm struct {
UID uint64 `form:"uid"`
}
APIGETCouponsForm form
type APIPOSTCouponForm ¶
type APIPOSTCouponForm struct { UID uint64 `form:"uid" json:"uid"` CouponType uint64 `form:"coupon_type" json:"coupon_type"` }
APIPOSTCouponForm form
type APIPUTCouponsForm ¶
type APIPUTCouponsForm struct {
CouponID uint64 `form:"coupon_id" json:"coupon_id" binding:"required,min=1"`
}
APIPUTCouponsForm form
Click to show internal directories.
Click to hide internal directories.