You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
662 B
Go

package ckey
import "fmt"
func projectUserKey(format string, a ...any) string {
return ProjectUser + fmt.Sprintf(format, a...)
}
// ProjectUserCreate 项目用户创建锁
func ProjectUserCreate(projectId int64, appUserId string) string {
return projectUserKey("project_user_create:%d_%s", projectId, appUserId)
}
// ProjectUserCoinNum 项目用户金币
func ProjectUserCoinNum(userId int64) string {
return projectUserKey("coin_num:%d", userId)
}
// ProjectUserCoinLack 项目用户金币api返回不足
func ProjectUserCoinLack(projectId int64, appUserId string) string {
return projectUserKey("project_user_coin_lack:%d_%s", projectId, appUserId)
}