异常处理
This commit is contained in:
parent
02f60eb381
commit
4d32a1420c
@ -14,6 +14,7 @@ func (this *apiComp) FuncGetList(session comm.IUserSession, req *pb.SysFuncGetLi
|
|||||||
var (
|
var (
|
||||||
bChange bool
|
bChange bool
|
||||||
change []string = make([]string, 0)
|
change []string = make([]string, 0)
|
||||||
|
list *pb.DBOpenCond
|
||||||
)
|
)
|
||||||
rsp := &pb.SysFuncGetListResp{}
|
rsp := &pb.SysFuncGetListResp{}
|
||||||
rsp.Cond = make(map[string]int32, 0)
|
rsp.Cond = make(map[string]int32, 0)
|
||||||
@ -25,7 +26,14 @@ func (this *apiComp) FuncGetList(session comm.IUserSession, req *pb.SysFuncGetLi
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
list, _ := this.module.modelSys.GetOpenCondList(session.GetUserId())
|
if list, err = this.module.modelSys.GetOpenCondList(session.GetUserId()); err != nil {
|
||||||
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_DBError,
|
||||||
|
Title: pb.ErrorCode_DBError.ToString(),
|
||||||
|
Message: err.Error(),
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
if len(req.Keys) == 0 {
|
if len(req.Keys) == 0 {
|
||||||
for _, v := range opencfg.GetDataList() {
|
for _, v := range opencfg.GetDataList() {
|
||||||
if list.Cond[v.Id] == 0 {
|
if list.Cond[v.Id] == 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user