From 73a3d53bfcfa0fde7b9ea2a14c8bcfea42ebf3ad Mon Sep 17 00:00:00 2001
From: lishihai <dslsh@dscom>
Date: 星期四, 13 六月 2024 10:50:00 +0800
Subject: [PATCH] 概述(一级模块)-入库(二级模块)-新建时保存新建单据人信息;验证时保存验证人信息
---
conf/config.go | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/conf/config.go b/conf/config.go
index c521566..8f40e75 100644
--- a/conf/config.go
+++ b/conf/config.go
@@ -47,6 +47,11 @@
fileTemplateConf struct {
InputSelfmadeAddr string //鍏ュ簱鑷埗鍗曟ā鐗堝湴鍧�
}
+
+ dingTalkConf struct {
+ AlarmKey string
+ AlarmUrl string
+ }
)
var (
@@ -56,6 +61,7 @@
LocalConf = &localConf{}
Viper *viper.Viper
GrpcServerConf = &grpcServerConf{}
+ DingTalkConf = &dingTalkConf{}
)
func Init() error {
@@ -76,6 +82,7 @@
apsAddr := os.Getenv("APS_GRPC")
crmAddr := os.Getenv("CRM_GRPC")
srmAddr := os.Getenv("SRM_GRPC")
+ companyName := os.Getenv("COMPANY_NAME")
if len(GrpcPort) > 0 {
WebConf.GrpcPort = GrpcPort
}
@@ -93,6 +100,9 @@
}
if len(srmAddr) > 0 {
GrpcServerConf.SrmAddr = srmAddr
+ }
+ if len(companyName) > 0 {
+ WebConf.CompanyName = companyName
}
DBHost := os.Getenv("DB_HOST")
@@ -117,6 +127,7 @@
_ = v.UnmarshalKey("db", DbConf)
_ = v.UnmarshalKey("local", LocalConf)
_ = v.UnmarshalKey("grpcServer", GrpcServerConf)
+ _ = v.UnmarshalKey("dingTalk", DingTalkConf)
showConfig()
}
@@ -127,5 +138,6 @@
log.Printf(" DbConf: %+v", DbConf)
log.Printf(" LocalConf: %+v", LocalConf)
log.Printf(" GrpcServerConf: %+v", GrpcServerConf)
+ log.Printf(" DingTalkConf: %+v", DingTalkConf)
log.Println("......................................................")
}
--
Gitblit v1.8.0