nacos config
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user