From 4d6ca1d2917c452933f573fbec1ca0708bed2cdf Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Fri, 1 Sep 2023 16:17:40 +0800 Subject: [PATCH] fix --- server/info/internal/logic/infologic.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/info/internal/logic/infologic.go b/server/info/internal/logic/infologic.go index 9ac5323d..bafecd32 100644 --- a/server/info/internal/logic/infologic.go +++ b/server/info/internal/logic/infologic.go @@ -48,6 +48,7 @@ type ModuleQuery struct { } func (mquery *ModuleQuery) EncodeQuery(field string) string { + var qstr []byte = []byte("JSON_OBJECT(") for query := range mquery.ModuleQuery { @@ -98,6 +99,10 @@ func (l *InfoLogic) Info(req *types.UserInfoRequest, userinfo *auth.UserInfo) (r moduleName := mlist[1] cond = fmt.Sprintf("module = '%s' and %s", moduleName, cond) + if len(mlist) == 2 { + mlist = append(mlist, "") + } + if mquery, ok := mquerys[mtable]; ok { mquery.ModuleQuery[strings.Join(mlist[2:], ",")] = struct{}{} } else {