nacos config

This commit is contained in:
eson 2023-09-21 14:53:21 +08:00
parent bdc5b6edb7
commit 6329c02b8e
2 changed files with 6 additions and 5 deletions

View File

@ -8,16 +8,18 @@ run_server() {
server_name=$1
echo "Running $server_name"
# 如果之前存在相同名字的 screen 会话,先将其终止
existing_session=$(screen -ls | grep -w "$server_name")
if [ -n "$existing_session" ]; then
echo "Terminating existing screen session for $server_name"
screen -S "$server_name" -X quit
fi
# 导航到相应的目录
# 导航到相应的目录
cd server/$server_name
go build -linkshared
[ -f .gitignore ] || echo $server_name > .gitignore
# 使用 screen 运行 go run <server_name>.go
screen -dmS $server_name -L ./$server_name

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 {