key_func.go 1.59 KB
Newer Older
chenweijian's avatar
chenweijian committed
1 2 3 4 5 6 7 8
package rediskey

import (
	"fmt"
	"git.hilo.cn/hilo-common/utils"
	"time"
)

chenweijian's avatar
chenweijian committed
9
func GetSlotFruitDailyTimes(userId uint64, nowTime time.Time) string {
chenweijian's avatar
chenweijian committed
10
	var cstZone = time.FixedZone("CST", 3*3600) // 东三区,沙特时间
chenweijian's avatar
chenweijian committed
11
	return fmt.Sprintf(SlotFruitWeeklyDailyTask, nowTime.In(cstZone).Format(utils.DATE_FORMAT), userId)
chenweijian's avatar
chenweijian committed
12 13 14 15
}

func GetOpenRamadanChargeAwardTimes(actId, userId uint64) string {
	return fmt.Sprintf(OpenRamadanChargeAwardTimes, actId, userId)
chenweijian's avatar
chenweijian committed
16
}
chenweijian's avatar
chenweijian committed
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

func GetOpenRamadanTaskTimesMic(actId, userId uint64) string {
	return fmt.Sprintf(OpenRamadanTaskTimesMic, actId, time.Now().Format(utils.DATE_FORMAT), userId)
}

func GetOpenRamadanTaskTimesLudo(actId, userId uint64) string {
	return fmt.Sprintf(OpenRamadanTaskTimesLudo, actId, time.Now().Format(utils.DATE_FORMAT), userId)
}

func GetOpenRamadanTaskTimesFruit(actId, userId uint64) string {
	return fmt.Sprintf(OpenRamadanTaskTimesFruit, actId, time.Now().Format(utils.DATE_FORMAT), userId)
}

func GetOpenRamadanTaskTimesSlot(actId, userId uint64) string {
	return fmt.Sprintf(OpenRamadanTaskTimesSlot, actId, time.Now().Format(utils.DATE_FORMAT), userId)
}

func GetOpenRamadanTaskTimesEnter(actId, userId uint64) string {
	return fmt.Sprintf(OpenRamadanTaskTimesEnter, actId, time.Now().Format(utils.DATE_FORMAT), userId)
}

func GetOpenRamadanTaskTimesRoom(actId, userId, roomId uint64) string {
	return fmt.Sprintf(OpenRamadanTaskTimesRoom, actId, time.Now().Format(utils.DATE_FORMAT), userId, roomId)
}
chenweijian's avatar
chenweijian committed
41 42 43 44

func GetOpenRamadanFruitBet(actId, userId uint64, round uint, date string) string {
	return fmt.Sprintf(OpenRamadanFruitBet, actId, date, userId, round)
}