Commit fb2a940dad8a306fc550224d4aa13335fdbd6f7a
1 parent
f259cd56
Exists in
master
and in
1 other branch
feat✨:游戏功能配置
Showing
1 changed file
with
1 additions
and
28 deletions
Show diff stats
configs/confcardholder/get.go
| @@ -6,36 +6,9 @@ import ( | @@ -6,36 +6,9 @@ import ( | ||
| 6 | 6 | ||
| 7 | // GetCurrent 获取 当前配置 | 7 | // GetCurrent 获取 当前配置 |
| 8 | func GetCurrent(gameId string) (conf *ActivityConfig, has bool) { | 8 | func GetCurrent(gameId string) (conf *ActivityConfig, has bool) { |
| 9 | - //currentKey := fmt.Sprintf("%s:%s:%s:current", | ||
| 10 | - // svconst.REDIS_CACHEP_REFIX, | ||
| 11 | - // svconst.MYSQL_TABLE_S_CARDHOLDER_CONFIG, | ||
| 12 | - // gameId) | ||
| 13 | - //currentId := zredis.GetInt64(zredis.GetConn(), currentKey) | ||
| 14 | - //timeNow := lxtime.NowUninx() | ||
| 15 | - //confRaw := new(ActivityConfigRaw) | ||
| 16 | - //hasFind := false | ||
| 17 | - //if currentId == 0 { | ||
| 18 | - // hasFind = confbase.FindDuringTime(confRaw, gameId) | ||
| 19 | - //} else { | ||
| 20 | - // conf, has = GetConfig(gameId, currentId) | ||
| 21 | - // if has { | ||
| 22 | - // if timeNow < conf.StartTime || timeNow > conf.EndTime { | ||
| 23 | - // hasFind = confbase.FindDuringTime(confRaw, gameId) | ||
| 24 | - // } | ||
| 25 | - // } else { | ||
| 26 | - // hasFind = confbase.FindDuringTime(confRaw, gameId) | ||
| 27 | - // } | ||
| 28 | - //} | ||
| 29 | - //if hasFind { | ||
| 30 | - // conf = new(ActivityConfig) | ||
| 31 | - // conf.Decode(gameId, confRaw) | ||
| 32 | - // svredis.SaveData(gameId, conf) | ||
| 33 | - // has = true | ||
| 34 | - // currentId = conf.Id | ||
| 35 | - // _ = zredis.Set(zredis.GetConn(), currentKey, utstring.Int64ToString(currentId)) | ||
| 36 | - //} | ||
| 37 | conf = new(ActivityConfig) | 9 | conf = new(ActivityConfig) |
| 38 | has = confbase.GetCurrent[*ActivityConfig, ActivityConfigRaw](gameId, conf) | 10 | has = confbase.GetCurrent[*ActivityConfig, ActivityConfigRaw](gameId, conf) |
| 11 | + | ||
| 39 | return | 12 | return |
| 40 | } | 13 | } |
| 41 | 14 |