group_power_star.go 583 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
package groupPower_k

import (
	"fmt"
	"hilo-group/_const/enum/groupPower_e"
	"hilo-group/_const/redis_key"
)

// 家族之星榜单
// type: 1:送礼 2:活跃 3:收礼
JiebinHu's avatar
JiebinHu committed
11 12
// date:天/周/月的开始时间
const GroupPowerStarPrefix = "groupPowerStar:${type}:${period}:${groupPowerId}:${date}" // zset member:userId score:分数
13

JiebinHu's avatar
JiebinHu committed
14
func GetGroupPowerStarRankKey(_type groupPower_e.GroupPowerStarType, period string, groupPowerId uint64, date string) string {
15
	return redis_key.ReplaceKey(GroupPowerStarPrefix,
JiebinHu's avatar
JiebinHu committed
16
		fmt.Sprintf("%d", _type), period, fmt.Sprintf("%d", groupPowerId), date)
17
}