sys errdata
This commit is contained in:
parent
125f4b30f7
commit
90e6c7a6b5
@ -17,7 +17,10 @@ func (this *apiComp) FuncActivate(session comm.IUserSession, req *pb.SysFuncActi
|
||||
opencfg := this.module.configure.getOpencondCfgByCid(req.Cid)
|
||||
if opencfg != nil {
|
||||
if id := this.module.modelSys.validCond(session.GetUserId(), opencfg); id == "" { // 条件不满足
|
||||
code = pb.ErrorCode_OpenCondErr
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_OpenCondErr,
|
||||
Title: pb.ErrorCode_OpenCondErr.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
@ -25,7 +28,10 @@ func (this *apiComp) FuncActivate(session comm.IUserSession, req *pb.SysFuncActi
|
||||
list, _ := this.module.modelSys.GetOpenCondList(session.GetUserId())
|
||||
for k, v := range list.Cond {
|
||||
if k == req.Cid && v != 0 {
|
||||
code = pb.ErrorCode_OpenCondActivate
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_OpenCondActivate,
|
||||
Title: pb.ErrorCode_OpenCondActivate.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
@ -35,7 +41,11 @@ func (this *apiComp) FuncActivate(session comm.IUserSession, req *pb.SysFuncActi
|
||||
})
|
||||
rsp.Cid = req.Cid
|
||||
if err := session.SendMsg(string(this.module.GetType()), "funcactivate", rsp); err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_SystemError,
|
||||
Title: pb.ErrorCode_SystemError.ToString(),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//手动激活通知模块
|
||||
|
@ -54,8 +54,6 @@ func (this *apiComp) FuncGetList(session comm.IUserSession, req *pb.SysFuncGetLi
|
||||
}
|
||||
}
|
||||
|
||||
if err := session.SendMsg(string(this.module.GetType()), "funcgetlist", rsp); err != nil {
|
||||
code = pb.ErrorCode_SystemError
|
||||
}
|
||||
session.SendMsg(string(this.module.GetType()), "funcgetlist", rsp)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user