From 4f526b034a6e13a521ad71dcbdbea97043d6ea19 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期三, 20 三月 2024 19:21:20 +0800
Subject: [PATCH] 发货信息字段完善

---
 main.go |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/main.go b/main.go
index 9bdf14c..04c6993 100644
--- a/main.go
+++ b/main.go
@@ -1,12 +1,14 @@
 package main
 
 import (
-	v1 "aps_crm/api/v1"
 	"aps_crm/conf"
 	"aps_crm/initialize"
 	"aps_crm/middleware"
 	"aps_crm/model"
+	"aps_crm/model/grpc_init"
 	"aps_crm/pkg/logx"
+	"aps_crm/proto/client"
+	"aps_crm/proto/crm_aps"
 	"aps_crm/proto/product_inventory"
 	"aps_crm/router"
 	"fmt"
@@ -49,10 +51,9 @@
 		WriteTimeout: 5 * time.Second,
 	}
 	//鍚姩grpc瀹㈡埛绔�
-	go v1.InitProductServiceConn()
 	go middleware.InitUserConn()
-	go v1.InitCodeServiceConn()
-	go v1.InitProductInventoryServiceConn()
+	go grpc_init.InitProductInventoryServiceConn()
+	go grpc_init.InitCrmApsGrpcServiceConn()
 	//鍚姩grpc鏈嶅姟
 	go func() {
 		ln, err := net.Listen("tcp", ":"+conf.Conf.System.GrpcPort)
@@ -63,6 +64,8 @@
 		s := grpc.NewServer()
 		//todo 娣诲姞鍏蜂綋鏈嶅姟
 		product_inventory.RegisterProductInventoryServiceServer(s, &product_inventory.Server{})
+		crm_aps.RegisterCrmAndApsGrpcServiceServer(s, &crm_aps.Server{})
+		client.RegisterClientServiceServer(s, &client.Server{})
 		err = s.Serve(ln)
 		if err != nil {
 			logx.Errorf("grpc server init error: %v", err.Error())
@@ -82,10 +85,9 @@
 	<-quit
 
 	middleware.StopRefreshUser()
-	v1.CloseProductServiceConn()
-	v1.CloseCodeServiceConn()
-	v1.CloseProductInventoryServiceConn()
+	grpc_init.CloseProductInventoryServiceConn()
 	middleware.CloseUserConn()
+	grpc_init.CloseCrmApsGrpcServiceConn()
 
 	logx.Infof("aps-crm exited...")
 	os.Exit(0)

--
Gitblit v1.8.0