From c5e3ee0ee8c368d6649b33ef1e04f119af76a027 Mon Sep 17 00:00:00 2001 From: 王家文 Date: Wed, 17 Apr 2024 09:51:44 +0800 Subject: [PATCH] refactor♻️:项目目录重构 --- configs/feat-api.go | 1 + configs/feat-cardholder.go | 2 +- configs/init.go | 4 ++-- configs/registry.go | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/configs/feat-api.go b/configs/feat-api.go index 8c69fcf..f19d113 100644 --- a/configs/feat-api.go +++ b/configs/feat-api.go @@ -7,6 +7,7 @@ import ( "fmt" ) +// ApiGameConfig api游戏配置 type ApiGameConfig struct { AppId string `gorm:"column:appid"` GameId string `gorm:"column:gameid"` diff --git a/configs/feat-cardholder.go b/configs/feat-cardholder.go index 0eaf684..ee98eda 100644 --- a/configs/feat-cardholder.go +++ b/configs/feat-cardholder.go @@ -25,7 +25,7 @@ type CardActivityConfig struct { func (c *CardActivityConfigRaw) TableName() string { return utdto.MYSQL_TABLE_TEMPLATE } -func (d *CardActivityConfigRaw) GetRule(gameId string) *svdto.DtoRule { +func (c *CardActivityConfigRaw) GetRule(gameId string) *svdto.DtoRule { tableName := constd.MYSQL_TABLE_S_CARDHOLDER_CONFIG return &svdto.DtoRule{ DbMysql: svconst.DbConfig, diff --git a/configs/init.go b/configs/init.go index 6653d6a..2368b03 100644 --- a/configs/init.go +++ b/configs/init.go @@ -2,7 +2,7 @@ package configs func Init() bool { - //gameId := "10149" + gameId := "10149" ////{ //// conf := &ApiGameConfig{AppId: "dsadsads", GameId: gameId, Name: "Name"} //// CacheSave(gameId, conf) @@ -24,7 +24,7 @@ func Init() bool { // LoadConfig(gameId) //} - _, _ = GetApiGame("10149") + _, _ = GetApiGame(gameId) return true } diff --git a/configs/registry.go b/configs/registry.go index 6e4f852..92af09c 100644 --- a/configs/registry.go +++ b/configs/registry.go @@ -6,6 +6,7 @@ import ( "fmt" ) +// GetApiGame 获取 api游戏配置 func GetApiGame(gameId string) (conf *ApiGameConfig, err error) { conf = new(ApiGameConfig) has := CacheLoad(gameId, conf) -- libgit2 0.21.0