From bccee8accc9536f05184708fef39e33aafffa3b7 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Thu, 6 Jul 2023 14:20:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=A1=A5=E5=85=85=20?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=8E=89=E8=90=BD=E7=9B=B8=E5=85=B3=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- comm/imodule.go | 1 + modules/tools/module.go | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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() }