系统房奖品价值缺失
This commit is contained in:
parent
1d89a8c36e
commit
0f1f8a03c2
|
@ -7,8 +7,8 @@ import (
|
||||||
|
|
||||||
"go.mongodb.org/mongo-driver/mongo"
|
"go.mongodb.org/mongo-driver/mongo"
|
||||||
|
|
||||||
"mongo.games.com/game/common"
|
|
||||||
mon "mongo.games.com/game/mongo"
|
mon "mongo.games.com/game/mongo"
|
||||||
|
"mongo.games.com/game/util/viperx"
|
||||||
"mongo.games.com/goserver/core/logger"
|
"mongo.games.com/goserver/core/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ type ServiceContext struct {
|
||||||
|
|
||||||
func NewServiceContext() *ServiceContext {
|
func NewServiceContext() *ServiceContext {
|
||||||
|
|
||||||
vp := common.GetViper("mgo", "json")
|
vp := viperx.GetViper("mgo", "json")
|
||||||
// mongo初始化
|
// mongo初始化
|
||||||
conf := &mon.Config{}
|
conf := &mon.Config{}
|
||||||
err := vp.Unmarshal(conf)
|
err := vp.Unmarshal(conf)
|
||||||
|
|
|
@ -18,7 +18,7 @@ import (
|
||||||
"mongo.games.com/game/statistics/static"
|
"mongo.games.com/game/statistics/static"
|
||||||
"mongo.games.com/game/statistics/syn"
|
"mongo.games.com/game/statistics/syn"
|
||||||
"mongo.games.com/game/statistics/tools"
|
"mongo.games.com/game/statistics/tools"
|
||||||
"mongo.games.com/game/util"
|
"mongo.games.com/game/util/viperx"
|
||||||
)
|
)
|
||||||
|
|
||||||
var VP *viper.Viper
|
var VP *viper.Viper
|
||||||
|
@ -95,9 +95,9 @@ func DoTickPlatform(ctx context.Context, wg *sync.WaitGroup, duration time.Durat
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
VP = util.GetViper("config", "yaml")
|
VP = viperx.GetViper("config", "yaml")
|
||||||
// mongo
|
// mongo
|
||||||
vp := util.GetViper("mongo", "yaml")
|
vp := viperx.GetViper("mongo", "yaml")
|
||||||
// mongo初始化
|
// mongo初始化
|
||||||
conf := &mongo.Config{}
|
conf := &mongo.Config{}
|
||||||
err := vp.Unmarshal(conf)
|
err := vp.Unmarshal(conf)
|
||||||
|
@ -108,7 +108,7 @@ func main() {
|
||||||
defer mongo.Close()
|
defer mongo.Close()
|
||||||
|
|
||||||
// mysql
|
// mysql
|
||||||
vp = util.GetViper("mysql", "yaml")
|
vp = viperx.GetViper("mysql", "yaml")
|
||||||
myConf := &mysql.Config{}
|
myConf := &mysql.Config{}
|
||||||
err = vp.Unmarshal(myConf)
|
err = vp.Unmarshal(myConf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package util
|
package viperx
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
|
@ -300,6 +300,8 @@ func (c *CustomRoomMgr) UpdateCreate(plt string, configId int32, mustCreate bool
|
||||||
RoomConfigId: roomConfig.GetId(),
|
RoomConfigId: roomConfig.GetId(),
|
||||||
CostType: 1,
|
CostType: 1,
|
||||||
Voice: cfg.GetVoice(),
|
Voice: cfg.GetVoice(),
|
||||||
|
Price: roomConfig.GetPrice(),
|
||||||
|
ImageURL: roomConfig.GetImageURI(),
|
||||||
},
|
},
|
||||||
RoomConfigSystem: cfg,
|
RoomConfigSystem: cfg,
|
||||||
IsRecruit: true,
|
IsRecruit: true,
|
||||||
|
|
Loading…
Reference in New Issue