From 318c49da20ec30c4f85ef35e479499e82a841b25 Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期一, 11 三月 2024 14:18:13 +0800
Subject: [PATCH] swag提交

---
 main.go |   27 +++++++++++++--------------
 1 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/main.go b/main.go
index 68e32ad..2a44bc8 100644
--- a/main.go
+++ b/main.go
@@ -11,14 +11,12 @@
 	"syscall"
 	"time"
 	"wms/conf"
-	"wms/controllers"
 	"wms/models"
 	"wms/pkg/logx"
-	"wms/proto/client"
+	"wms/proto/init_client"
 	"wms/proto/inventory_order"
 	"wms/proto/product_inventory"
 	"wms/proto/purchase_wms"
-	"wms/proto/supplier"
 	"wms/router"
 	"wms/service"
 )
@@ -49,11 +47,12 @@
 	}
 	go shutdown(server)
 	//鍚姩grpc瀹㈡埛绔�
-	go controllers.InitInventoryOrderServiceConn()
-	go controllers.InitProductInventoryServiceConn()
-	go controllers.InitCodeServiceConn()
-	go supplier.InitConn()
-	go client.InitConn()
+	//go controllers.InitInventoryOrderServiceConn()
+	//go controllers.InitProductInventoryServiceConn()
+	//go controllers.InitCodeServiceConn()
+	//go supplier.InitConn()
+	//go client.InitConn()
+	go init_client.InitClient()
 	//鍚姩grpc鏈嶅姟
 	go func() {
 		ln, err := net.Listen("tcp", ":"+conf.WebConf.GrpcPort)
@@ -61,7 +60,6 @@
 			logx.Errorf("grpc server init error: %v", err.Error())
 			panic(fmt.Sprintf("grpc server init error: %v", err.Error()))
 		}
-		fmt.Println("-----------鐩戝惉绔彛: ", conf.WebConf.GrpcPort)
 		s := grpc.NewServer()
 		//todo 娣诲姞鍏蜂綋鏈嶅姟
 		product_inventory.RegisterProductInventoryServiceServer(s, &product_inventory.Server{})
@@ -90,11 +88,12 @@
 	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
 	defer cancel()
 
-	controllers.CloseInventoryOrderServiceConn()
-	controllers.CloseProductInventoryServiceConn()
-	controllers.CloseCodeServiceConn()
-	supplier.CloseConn()
-	client.CloseConn()
+	//controllers.CloseInventoryOrderServiceConn()
+	//controllers.CloseProductInventoryServiceConn()
+	//controllers.CloseCodeServiceConn()
+	//supplier.CloseConn()
+	//client.CloseConn()
+	init_client.CloseClient()
 	// 鍏抽棴HTTP鏈嶅姟鍣�
 	if err := server.Shutdown(ctx); err != nil {
 		logx.Infof("鏈嶅姟浼橀泤閫�鍑哄け璐�: %v", err)

--
Gitblit v1.8.0