From 5b8f003464bd55678862534232228f61745ffafe Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期五, 15 十二月 2023 11:05:35 +0800
Subject: [PATCH] 提示信息修改
---
main.go | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/main.go b/main.go
index 9bdf14c..bd94e74 100644
--- a/main.go
+++ b/main.go
@@ -6,7 +6,10 @@
"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 +52,9 @@
WriteTimeout: 5 * time.Second,
}
//鍚姩grpc瀹㈡埛绔�
- go v1.InitProductServiceConn()
go middleware.InitUserConn()
- go v1.InitCodeServiceConn()
go v1.InitProductInventoryServiceConn()
+ go grpc_init.InitCrmApsGrpcServiceConn()
//鍚姩grpc鏈嶅姟
go func() {
ln, err := net.Listen("tcp", ":"+conf.Conf.System.GrpcPort)
@@ -63,6 +65,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 +86,9 @@
<-quit
middleware.StopRefreshUser()
- v1.CloseProductServiceConn()
- v1.CloseCodeServiceConn()
v1.CloseProductInventoryServiceConn()
middleware.CloseUserConn()
+ grpc_init.CloseCrmApsGrpcServiceConn()
logx.Infof("aps-crm exited...")
os.Exit(0)
--
Gitblit v1.8.0