From 645e6cae2bdc4102c351c014bcc443b29fdd1dc1 Mon Sep 17 00:00:00 2001 From: liujiandao <274878379@qq.com> Date: 星期四, 16 十一月 2023 13:47:36 +0800 Subject: [PATCH] 代码恢复 --- main.go | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/main.go b/main.go index 4f7db20..9069f9a 100644 --- a/main.go +++ b/main.go @@ -15,6 +15,7 @@ "wms/models" "wms/pkg/logx" "wms/proto/product_inventory" + "wms/proto/purchase_wms" "wms/router" ) @@ -45,6 +46,8 @@ go shutdown(server) //鍚姩grpc瀹㈡埛绔� go controllers.InitInventoryOrderServiceConn() + go controllers.InitProductInventoryServiceConn() + go controllers.InitCodeServiceConn() //鍚姩grpc鏈嶅姟 go func() { ln, err := net.Listen("tcp", ":"+conf.WebConf.GrpcPort) @@ -56,6 +59,7 @@ s := grpc.NewServer() //todo 娣诲姞鍏蜂綋鏈嶅姟 product_inventory.RegisterProductInventoryServiceServer(s, &product_inventory.Server{}) + purchase_wms.RegisterPurchaseServiceServer(s, &purchase_wms.Server{}) err = s.Serve(ln) if err != nil { logx.Errorf("grpc server init error: %v", err.Error()) @@ -76,6 +80,8 @@ defer cancel() controllers.CloseInventoryOrderServiceConn() + controllers.CloseProductInventoryServiceConn() + controllers.CloseCodeServiceConn() // 鍏抽棴HTTP鏈嶅姟鍣� if err := server.Shutdown(ctx); err != nil { logx.Infof("鏈嶅姟浼橀泤閫�鍑哄け璐�: %v", err) -- Gitblit v1.8.0