diff --git a/run_all_server.sh b/run_all_server.sh index c6244a3d..b76f910a 100755 --- a/run_all_server.sh +++ b/run_all_server.sh @@ -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 .go screen -dmS $server_name -L ./$server_name diff --git a/server/info/internal/logic/infologic.go b/server/info/internal/logic/infologic.go index 27fc79dc..2ce5c883 100644 --- a/server/info/internal/logic/infologic.go +++ b/server/info/internal/logic/infologic.go @@ -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 {