接口调整

This commit is contained in:
meixiongfeng 2023-06-09 18:14:06 +08:00
parent 08a8764fe6
commit 65b97a090e
2 changed files with 17 additions and 3 deletions

View File

@ -36,7 +36,7 @@ type (
CheckTaskCond(session IUserSession, id int32) CheckTaskCond(session IUserSession, id int32)
CheckMlineCond(session IUserSession, id int32) CheckMlineCond(session IUserSession, id int32)
// 查询opencond 配置 // 查询opencond 配置
GetOpenCondCfgById(id string) (data *cfg.GameOpencondData, err error) GetOpenCondCfgById(uid string, id string) (bOpen bool, errdata *pb.ErrorData)
} }
//邮件业务模块对外接口定义 提供给其他模块使用的 //邮件业务模块对外接口定义 提供给其他模块使用的

View File

@ -95,6 +95,20 @@ func (this *ModuleSys) AutoActivate(session comm.IUserSession, cids []string) bo
return true return true
} }
func (this *ModuleSys) GetOpenCondCfgById(id string) (data *cfg.GameOpencondData, err error) { func (this *ModuleSys) GetOpenCondCfgById(uid string, id string) (bOpen bool, errdata *pb.ErrorData) {
return this.configure.GetOpenCondCfgById(id)
conf, err := this.configure.GetOpenCondCfgById(id)
if err != nil {
bOpen = false
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_ConfigNoFound.ToString(),
Message: err.Error(),
}
return
}
if this.ValidCond(uid, conf) != "" {
bOpen = true
}
return
} }