自动激活 和手动激活数据校验
This commit is contained in:
parent
4456644096
commit
142ff089aa
@ -29,12 +29,21 @@ func (this *ModelSys) Init(service core.IService, module core.IModule, comp core
|
|||||||
func (this *ModelSys) IsAccess(funName string, uid string) (code pb.ErrorCode) {
|
func (this *ModelSys) IsAccess(funName string, uid string) (code pb.ErrorCode) {
|
||||||
user := this.moduleSys.ModuleUser.GetUser(uid)
|
user := this.moduleSys.ModuleUser.GetUser(uid)
|
||||||
if user != nil {
|
if user != nil {
|
||||||
conf := this.moduleSys.configure.getFuncCfg(funName)
|
if conf := this.moduleSys.configure.getFuncCfg(funName); conf != nil {
|
||||||
if conf != nil {
|
if conf.ActivateType == 1 { // 已经手动激活过
|
||||||
this.validCond(uid, conf)
|
list, _ := this.GetOpenCondList(uid)
|
||||||
|
if v, ok := list.Cond[funName]; ok && v == 1 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if id := this.validCond(uid, conf); id != "" { // 条件满足已经激活
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
code = pb.ErrorCode_OpenCondErr
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user