From fc3313955a083c9480e4ea74398f72f9ba6addcd Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 01 八月 2024 20:29:51 +0800
Subject: [PATCH] 月度统计查询多单位数据计算改查询。

---
 proto/init_client/init_client.go |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/proto/init_client/init_client.go b/proto/init_client/init_client.go
index 3ba0163..3a22d07 100644
--- a/proto/init_client/init_client.go
+++ b/proto/init_client/init_client.go
@@ -31,10 +31,12 @@
 		logx.Errorf("grpc dial product service error: %v", err.Error())
 		return
 	}
-	AdminConn, err = grpc.Dial(conf.GrpcServerConf.AdminAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
-	if err != nil {
-		logx.Errorf("grpc dial product service error: %v", err.Error())
-		return
+	if len(conf.GrpcServerConf.AdminAddr) > 0 {
+		AdminConn, err = grpc.Dial(conf.GrpcServerConf.AdminAddr, grpc.WithTransportCredentials(insecure.NewCredentials()))
+		if err != nil {
+			logx.Errorf("grpc dial product service error: %v", err.Error())
+			return
+		}
 	}
 }
 

--
Gitblit v1.8.0