From 27be7a2c517404e4622470edf7b83b13129220ff Mon Sep 17 00:00:00 2001
From: jiangshuai <291802688@qq.com>
Date: 星期五, 08 十二月 2023 11:14:04 +0800
Subject: [PATCH] merge conflicts

---
 main.go |   28 +++++++++++++++-------------
 1 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/main.go b/main.go
index 91c2eeb..1801bbf 100644
--- a/main.go
+++ b/main.go
@@ -11,13 +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"
 )
@@ -48,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)
@@ -65,6 +65,7 @@
 		//todo 娣诲姞鍏蜂綋鏈嶅姟
 		product_inventory.RegisterProductInventoryServiceServer(s, &product_inventory.Server{})
 		purchase_wms.RegisterPurchaseServiceServer(s, &purchase_wms.Server{})
+		inventory_order.RegisterInventoryOrderServiceServer(s, &inventory_order.Server{})
 		err = s.Serve(ln)
 		if err != nil {
 			logx.Errorf("grpc server init error: %v", err.Error())
@@ -88,11 +89,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