Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop

This commit is contained in:
laodaming
2023-09-21 14:55:31 +08:00
2 changed files with 6 additions and 5 deletions

View File

@@ -120,13 +120,13 @@ func (l *InfoLogic) Info(req *types.UserInfoRequest, userinfo *auth.UserInfo) (r
cond := fmt.Sprintf("module = '%s' and %s", moduleName, condUser)
if mquery, ok := mquerys[mtable]; ok {
mquery.ModuleQuery[strings.Join(mlist[2:], ",")] = struct{}{}
mquery.ModuleQuery[strings.Join(mlist[2:], ".")] = struct{}{}
} else {
mquery := &ModuleQuery{
TableName: tname,
ModuleName: mtable + "." + moduleName,
Cond: cond,
ModuleQuery: map[string]struct{}{strings.Join(mlist[2:], ","): {}}}
ModuleQuery: map[string]struct{}{strings.Join(mlist[2:], "."): {}}}
mquerys[mtable] = mquery
}
}
@@ -134,7 +134,6 @@ func (l *InfoLogic) Info(req *types.UserInfoRequest, userinfo *auth.UserInfo) (r
for _, mquery := range mquerys {
sqlstr := fmt.Sprintf("select id, module, %s as querydata from %s where %s order by ctime DESC limit 1", mquery.EncodeQuery("metadata"), mquery.TableName, mquery.Cond)
raw := l.svcCtx.MysqlConn.Raw(sqlstr)
if raw.Error != nil {