diff --git a/db/rpc/svc/servicecontext.go b/db/rpc/svc/servicecontext.go index 3a54cee..7f11e8c 100644 --- a/db/rpc/svc/servicecontext.go +++ b/db/rpc/svc/servicecontext.go @@ -7,8 +7,8 @@ import ( "go.mongodb.org/mongo-driver/mongo" - "mongo.games.com/game/common" mon "mongo.games.com/game/mongo" + "mongo.games.com/game/util/viperx" "mongo.games.com/goserver/core/logger" ) @@ -19,7 +19,7 @@ type ServiceContext struct { func NewServiceContext() *ServiceContext { - vp := common.GetViper("mgo", "json") + vp := viperx.GetViper("mgo", "json") // mongo初始化 conf := &mon.Config{} err := vp.Unmarshal(conf) diff --git a/statistics/main.go b/statistics/main.go index 56d81aa..dd5e27d 100644 --- a/statistics/main.go +++ b/statistics/main.go @@ -18,7 +18,7 @@ import ( "mongo.games.com/game/statistics/static" "mongo.games.com/game/statistics/syn" "mongo.games.com/game/statistics/tools" - "mongo.games.com/game/util" + "mongo.games.com/game/util/viperx" ) var VP *viper.Viper @@ -95,9 +95,9 @@ func DoTickPlatform(ctx context.Context, wg *sync.WaitGroup, duration time.Durat } func main() { - VP = util.GetViper("config", "yaml") + VP = viperx.GetViper("config", "yaml") // mongo - vp := util.GetViper("mongo", "yaml") + vp := viperx.GetViper("mongo", "yaml") // mongo初始化 conf := &mongo.Config{} err := vp.Unmarshal(conf) @@ -108,7 +108,7 @@ func main() { defer mongo.Close() // mysql - vp = util.GetViper("mysql", "yaml") + vp = viperx.GetViper("mysql", "yaml") myConf := &mysql.Config{} err = vp.Unmarshal(myConf) if err != nil { diff --git a/util/viper.go b/util/viperx/viper.go similarity index 96% rename from util/viper.go rename to util/viperx/viper.go index 3b695c3..73519eb 100644 --- a/util/viper.go +++ b/util/viperx/viper.go @@ -1,4 +1,4 @@ -package util +package viperx import ( "fmt" diff --git a/worldsrv/customroommgr.go b/worldsrv/customroommgr.go index d25d937..0445cf3 100644 --- a/worldsrv/customroommgr.go +++ b/worldsrv/customroommgr.go @@ -300,6 +300,8 @@ func (c *CustomRoomMgr) UpdateCreate(plt string, configId int32, mustCreate bool RoomConfigId: roomConfig.GetId(), CostType: 1, Voice: cfg.GetVoice(), + Price: roomConfig.GetPrice(), + ImageURL: roomConfig.GetImageURI(), }, RoomConfigSystem: cfg, IsRecruit: true,