jiangshuai
2023-11-23 44bba3c3479d8b9cd04ef4087762f9f960c5bb55
main.go
@@ -14,6 +14,7 @@
   "wms/controllers"
   "wms/models"
   "wms/pkg/logx"
   "wms/proto/client"
   "wms/proto/product_inventory"
   "wms/proto/purchase_wms"
   "wms/proto/supplier"
@@ -51,6 +52,7 @@
   go controllers.InitProductInventoryServiceConn()
   go controllers.InitCodeServiceConn()
   go supplier.InitConn()
   go client.InitConn()
   //启动grpc服务
   go func() {
      ln, err := net.Listen("tcp", ":"+conf.WebConf.GrpcPort)
@@ -90,6 +92,7 @@
   controllers.CloseProductInventoryServiceConn()
   controllers.CloseCodeServiceConn()
   supplier.CloseConn()
   client.CloseConn()
   // 关闭HTTP服务器
   if err := server.Shutdown(ctx); err != nil {
      logx.Infof("服务优雅退出失败: %v", err)