From 47000c8d61e28bc590d085753c8b9ceff8546121 Mon Sep 17 00:00:00 2001
From: jiangshuai <291802688@qq.com>
Date: 星期三, 08 十一月 2023 14:23:54 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/aps/WMS

---
 conf/config.go |   43 +++++++++++++++----------------------------
 1 files changed, 15 insertions(+), 28 deletions(-)

diff --git a/conf/config.go b/conf/config.go
index ccb00c6..59e6c92 100644
--- a/conf/config.go
+++ b/conf/config.go
@@ -23,30 +23,27 @@
 
 type (
 	webConf struct {
-		Host      string // 鏈満ip鍦板潃
-		Port      string // 绔彛鍙�
-		NodeId    string // 涓昏处鎴风敤鎴峰悕
-		OssType   string // 瀵硅薄瀛樺偍绫诲瀷
-		JWTSecret string
-		GrpcPort  string //grpc绔彛鍙�
+		Host       string // 鏈満ip鍦板潃
+		Port       string // 绔彛鍙�
+		NodeId     string // 涓昏处鎴风敤鎴峰悕
+		OssType    string // 瀵硅薄瀛樺偍绫诲瀷
+		JWTSecret  string
+		FileServer string //鏂囦欢鏈嶅姟鍣ㄥ湴鍧�
+		ServerId   string //鏈嶅姟ID
+		GrpcPort   string //grpc绔彛鍙�
 	}
 
 	localConf struct {
 		StorePath string // 鏈湴鏂囦欢瀛樺偍璺緞
 	}
-
-	grpcServerConf struct {
-		ApsAddr string //aps鏈嶅姟grpc鍦板潃
-	}
 )
 
 var (
-	WebConf        = &webConf{}
-	LogConf        = &logx.Conf{}
-	DbConf         = &mysqlx.Conf{}
-	LocalConf      = &localConf{}
-	Viper          *viper.Viper
-	GrpcServerConf = &grpcServerConf{}
+	WebConf   = &webConf{}
+	LogConf   = &logx.Conf{}
+	DbConf    = &mysqlx.Conf{}
+	LocalConf = &localConf{}
+	Viper     *viper.Viper
 )
 
 func Init() error {
@@ -61,21 +58,13 @@
 	}
 	read2Conf(Viper)
 
-	nodeId := os.Getenv("NODE_ID")    // 涓昏处鎴风敤鎴峰悕
-	host := os.Getenv("HOST")         // 鏈満IP鍦板潃
-	GrpcPort := os.Getenv("WMS_GRPC") // 鍙澶栨彁渚沢rpc鏈嶅姟锛屾湰鏈嶅姟涓嶇敤
-	apsAddr := os.Getenv("APS_GRPC")
-	if len(GrpcPort) > 0 {
-		WebConf.GrpcPort = GrpcPort
-	}
+	nodeId := os.Getenv("NODE_ID") // 涓昏处鎴风敤鎴峰悕
+	host := os.Getenv("HOST")      // 鏈満IP鍦板潃
 	if len(nodeId) > 0 {
 		WebConf.NodeId = nodeId
 	}
 	if len(host) > 0 {
 		WebConf.Host = host
-	}
-	if len(apsAddr) > 0 {
-		GrpcServerConf.ApsAddr = apsAddr
 	}
 
 	DBHost := os.Getenv("DB_HOST")
@@ -99,7 +88,6 @@
 	_ = v.UnmarshalKey("log", LogConf)
 	_ = v.UnmarshalKey("db", DbConf)
 	_ = v.UnmarshalKey("local", LocalConf)
-	_ = v.UnmarshalKey("grpcServer", GrpcServerConf)
 	showConfig()
 }
 
@@ -109,6 +97,5 @@
 	log.Printf("   LogConf:                %+v", LogConf)
 	log.Printf("   DbConf:                 %+v", DbConf)
 	log.Printf("   LocalConf:               %+v", LocalConf)
-	log.Printf("   GrpcServerConf:               %+v", GrpcServerConf)
 	log.Println("......................................................")
 }

--
Gitblit v1.8.0