diff --git a/proxyserver/main.go b/proxyserver/main.go index fa6aee17..f2ca45b6 100644 --- a/proxyserver/main.go +++ b/proxyserver/main.go @@ -20,6 +20,16 @@ import ( "github.com/gorilla/websocket" "github.com/zeromicro/go-zero/core/logx" "gopkg.in/yaml.v2" + + _ "fusenapi/utils/auth" + _ "fusenapi/utils/autoconfig" + _ "fusenapi/utils/check" + _ "fusenapi/utils/collect" + _ "fusenapi/utils/encryption_decryption" + _ "fusenapi/utils/fsconfig" + _ "fusenapi/utils/fssql" + + _ "github.com/zeromicro/go-zero/rest" ) // Backend结构体 diff --git a/run_all_server.sh b/run_all_server.sh index c59fa263..c6244a3d 100755 --- a/run_all_server.sh +++ b/run_all_server.sh @@ -17,7 +17,7 @@ run_server() { # 导航到相应的目录 cd server/$server_name - go build + go build -linkshared [ -f .gitignore ] || echo $server_name > .gitignore # 使用 screen 运行 go run .go screen -dmS $server_name -L ./$server_name @@ -40,9 +40,10 @@ done # 在每个服务器目录下运行相应的 go 程序 for server_dir in "${server_dirs[@]}"; do - run_server $server_dir & + run_server $server_dir done + # 定义目录和screen名称 dir_path="./proxyserver" screen_name="proxyserver" diff --git a/server/info/internal/logic/infologic.go b/server/info/internal/logic/infologic.go index e7e2bc64..27fc79dc 100644 --- a/server/info/internal/logic/infologic.go +++ b/server/info/internal/logic/infologic.go @@ -133,7 +133,7 @@ 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 dec limit 1", mquery.EncodeQuery("metadata"), mquery.TableName, mquery.Cond) + 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) diff --git a/server/info/internal/logic/infologic_test.go b/server/info/internal/logic/infologic_test.go index 0c11f2d4..11bad8a8 100644 --- a/server/info/internal/logic/infologic_test.go +++ b/server/info/internal/logic/infologic_test.go @@ -55,7 +55,7 @@ func TestMain(t *testing.T) { for _, mquery := range mquerys { - sqlstr := fmt.Sprintf("select id, module, %s as querydata from %s where %s order by ctime asc limit 1", mquery.EncodeQuery("metadata"), mquery.TableName, mquery.Cond) + sqlstr := fmt.Sprintf("select id, module, %s as querydata from %s where %s order by ctime dec limit 1", mquery.EncodeQuery("metadata"), mquery.TableName, mquery.Cond) raw := conn.Raw(sqlstr)