条件开启
This commit is contained in:
parent
afd86b95b0
commit
edeffa6e88
@ -19,9 +19,14 @@ func (this *apiComp) FuncGetList(session comm.IUserSession, req *pb.SysFuncGetLi
|
||||
if len(req.Keys) == 0 {
|
||||
confList := this.module.configure.getOpencondList()
|
||||
for _, v := range confList {
|
||||
id := this.module.modelSys.validCond(session.GetUserId(), v)
|
||||
if id != "" {
|
||||
rsp.Cond[id] = 1
|
||||
if v.ActivateType == 0 {
|
||||
id := this.module.modelSys.validCond(session.GetUserId(), v)
|
||||
if id != "" {
|
||||
rsp.Cond[id] = 1
|
||||
}
|
||||
|
||||
} else {
|
||||
rsp.Cond[v.Id] = 0
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -31,9 +36,13 @@ func (this *apiComp) FuncGetList(session comm.IUserSession, req *pb.SysFuncGetLi
|
||||
continue
|
||||
}
|
||||
if conf, ok := opencfg.GetDataMap()[key]; ok {
|
||||
id := this.module.modelSys.validCond(session.GetUserId(), conf)
|
||||
if id != "" {
|
||||
rsp.Cond[id] = 1
|
||||
if conf.ActivateType == 0 {
|
||||
id := this.module.modelSys.validCond(session.GetUserId(), conf)
|
||||
if id != "" {
|
||||
rsp.Cond[id] = 1
|
||||
}
|
||||
} else {
|
||||
rsp.Cond[conf.Id] = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -41,9 +50,7 @@ func (this *apiComp) FuncGetList(session comm.IUserSession, req *pb.SysFuncGetLi
|
||||
|
||||
list, _ := this.module.modelSys.GetOpenCondList(session.GetUserId())
|
||||
for k, v := range list.Cond {
|
||||
//if _, ok := rsp.Cond[k]; ok {
|
||||
rsp.Cond[k] = v
|
||||
//}
|
||||
}
|
||||
if err := session.SendMsg(string(this.module.GetType()), "funcgetlist", rsp); err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
|
Loading…
Reference in New Issue
Block a user