Documentation ¶
Overview ¶
*
- Redis实现 用户分布式锁
Index ¶
- func DistributionGiftPool() int
- func GetCacheCodeNum(giftId int, codeService services.CodeService) (int, int)
- func GetGiftPoolNum(id int) int
- func ImportCacheCodes(giftId int, code string) bool
- func IncrIpLuckyNum(strIp string) int64
- func IncrUserLuckyNum(uid int) int64
- func InitUserLuckyNum(uid int, num int64)
- func LockLucky(uid int) bool
- func PrizeCodeDiff(giftId int, codeService services.CodeService) string
- func PrizeCodeDiffDeprecated(giftId int, codeService services.CodeService) string
- func PrizeGift(id, leftNum int) bool
- func RecacheCodes(giftId int, codeService services.CodeService) (succNum, failNum int)
- func ResetGiftPrizeData(giftInfo *models.LtGift, giftService services.GiftService)
- func UnlockLucky(uid int) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCacheCodeNum ¶
func GetCacheCodeNum(giftId int, codeService services.CodeService) (int, int)
func IncrUserLuckyNum ¶
func InitUserLuckyNum ¶
func PrizeCodeDiff ¶
func PrizeCodeDiff(giftId int, codeService services.CodeService) string
func PrizeCodeDiffDeprecated ¶
func PrizeCodeDiffDeprecated(giftId int, codeService services.CodeService) string
TODO : NOTICE 优惠券发放MySQL版本,废弃 func PrizeCodeDiff_MySQL(giftId int, codeService services.CodeService) string {
func RecacheCodes ¶
func RecacheCodes(giftId int, codeService services.CodeService) (succNum, failNum int)
重新整理优惠券编码到缓存
func ResetGiftPrizeData ¶
func ResetGiftPrizeData(giftInfo *models.LtGift, giftService services.GiftService)
奖品的发奖计划
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.