get.go
639 Bytes
package confcardholder
import (
"apigame/configs/confbase"
)
// GetCurrent 获取 当前配置
func GetCurrent(gameId string) (conf *ActivityConfig, has bool) {
conf = new(ActivityConfig)
has = confbase.GetCurrent[*ActivityConfig, ActivityConfigRaw](gameId, conf)
if !has {
conf = new(ActivityConfig)
has = confbase.FindCurrent[*ActivityConfig, ActivityConfigRaw](gameId, conf)
}
return
}
// GetConfig 获取 配置根据Id
func GetConfig(gameId string, confId int64) (conf *ActivityConfig, has bool) {
conf = new(ActivityConfig)
has = confbase.GetConfig[*ActivityConfig, ActivityConfigRaw](gameId, confId, conf)
return
}