From 54ee174fbf2b25a60b1212c5b7ed815d97f05ad4 Mon Sep 17 00:00:00 2001 From: eson <9673575+githubcontent@user.noreply.gitee.com> Date: Fri, 1 Sep 2023 12:32:17 +0800 Subject: [PATCH] fix --- server/info/internal/logic/infologic.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/info/internal/logic/infologic.go b/server/info/internal/logic/infologic.go index 3f88b3ab..138a9cc4 100644 --- a/server/info/internal/logic/infologic.go +++ b/server/info/internal/logic/infologic.go @@ -57,7 +57,7 @@ func (mquery *ModuleQuery) EncodeQuery(field string) string { var qstr []byte = []byte("JSON_OBJECT(") for query := range mquery.ModuleQuery { - qstr = append(qstr, []byte(fmt.Sprintf("'%s.%s', %s ->> %s,", mquery.ModuleName, query, field, query))...) + qstr = append(qstr, []byte(fmt.Sprintf("'%s.%s', %s ->> $.%s,", mquery.ModuleName, query, field, query))...) } if qstr[len(qstr)-1] == ',' { qstr[len(qstr)-1] = ')' @@ -109,7 +109,6 @@ func (l *InfoLogic) Info(req *types.UserInfoRequest, userinfo *auth.UserInfo) (r ModuleQuery: map[string]struct{}{strings.Join(mlist[1:], ","): {}}} mquerys[mtable] = mquery } - } for _, mquery := range mquerys {