diff --git a/comm/imodule.go b/comm/imodule.go index a72e0b81a..b37f024e3 100644 --- a/comm/imodule.go +++ b/comm/imodule.go @@ -495,6 +495,7 @@ type ( GetHeroConfig(heroCfgId string) (conf *cfg.GameHeroData, err error) GetPriceGroupLen(pricegroupId int32) (count int32, err error) GetGrormetLlame(id string) (data int32, err error) + GetGroupDataByLotteryId(id int32) (data *cfg.GameLotteryData, err error) } IReputation interface { diff --git a/modules/tools/module.go b/modules/tools/module.go index be7b7f5c2..c4d7c8328 100644 --- a/modules/tools/module.go +++ b/modules/tools/module.go @@ -55,7 +55,13 @@ func (this *Tools) GetGroupDataByLottery(lotteryId int32, vipLv int32, lv int32) items = this.configure.GetGroupDataByLottery(lotteryId, vipLv, lv) return } - +func (this *Tools) GetGroupDataByLotteryId(id int32) (data *cfg.GameLotteryData, err error) { + data = this.configure.GetLotterConfById(id) + if data == nil { + err = comm.NewNotFoundConfErr("game_lottery", game_lottery, id) + } + return +} func (this *Tools) GetGlobalConf() *cfg.GameGlobalData { return this.configure.GetGlobalConf() }