This commit is contained in:
wh_zcy 2023-06-09 18:11:26 +08:00
commit b6d92d23aa
3 changed files with 22 additions and 6 deletions

View File

@ -35,6 +35,8 @@ type (
CheckLvUpCond(session IUserSession, lv int32)
CheckTaskCond(session IUserSession, id int32)
CheckMlineCond(session IUserSession, id int32)
// 查询opencond 配置
GetOpenCondCfgById(id string) (data *cfg.GameOpencondData, err error)
}
//邮件业务模块对外接口定义 提供给其他模块使用的

View File

@ -2,6 +2,7 @@ package sys
import (
"fmt"
"go_dreamfactory/comm"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
"go_dreamfactory/sys/configure"
@ -28,8 +29,6 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
//this.LoadConfigure(gameOpencond, cfg.NewGameOpencond)
configure.RegisterConfigure(gameOpencond, cfg.NewGameOpencond, this.LoadCondConfig)
this.module = module.(*ModuleSys)
this.getFuncCfg("sign")
return
}
@ -85,11 +84,22 @@ func (this *configureComp) getOpencondCfg() (data *cfg.GameOpencond, err error)
return
}
func (this *configureComp) getFuncCfg(funcName string) (data *cfg.GameOpencondData) {
if cfg, err := this.getOpencondCfg(); err == nil {
data = cfg.GetDataMap()[funcName]
func (this *configureComp) GetOpenCondCfgById(id string) (data *cfg.GameOpencondData, err error) {
var (
v interface{}
)
if v, err = this.GetConfigure(gameOpencond); err == nil {
if c, ok := v.(*cfg.GameOpencond); ok {
if data = c.Get(id); data != nil {
return
}
}
}
return nil
err = comm.NewNotFoundConfErr("opencond", gameOpencond, id)
return
}
func (this *configureComp) getOpencondList() (list []*cfg.GameOpencondData) {

View File

@ -94,3 +94,7 @@ func (this *ModuleSys) AutoActivate(session comm.IUserSession, cids []string) bo
})
return true
}
func (this *ModuleSys) GetOpenCondCfgById(id string) (data *cfg.GameOpencondData, err error) {
return this.configure.GetOpenCondCfgById(id)
}