common.go
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package constant
import "os"
const SERVICE_NAME = "partnermg"
var LOG_LEVEL = "debug"
var LOG_File = "./logs/partnermg.log"
var IMPORT_EXCEL = "./download/订单数据模板.xlsx"
var Log_PREFIX = "[partnermg_dev]"
var (
UCENTER_HOST = "https://suplus-ucenter-test.fjmaimaimai.com" //统一用户中心地址
UCENTER_SECRET = "cykbjnfqgctn"
UCENTER_APP_KEY = "39aefef9e22744a3b2d2d3791824ae7b"
UCENTER_CHECK_ALT = "rsF0pL!6DwjBO735"
)
var (
BUSINESS_ADMIN_HOST = "http://suplus-business-admin-test.fjmaimaimai.com" //企业平台的地址
)
var EXCEL_COLUMN = 12
func init() {
if os.Getenv("LOG_LEVEL") != "" {
LOG_LEVEL = os.Getenv("LOG_LEVEL")
}
if os.Getenv("UCENTER_HOST") != "" {
UCENTER_HOST = os.Getenv("UCENTER_HOST")
}
if os.Getenv("UCENTER_SECRET") != "" {
UCENTER_SECRET = os.Getenv("UCENTER_SECRET")
}
if os.Getenv("UCENTER_APP_KEY") != "" {
UCENTER_APP_KEY = os.Getenv("UCENTER_APP_KEY")
}
if os.Getenv("UCENTER_CHECK_ALT") != "" {
UCENTER_CHECK_ALT = os.Getenv("UCENTER_CHECK_ALT")
}
if os.Getenv("BUSINESS_ADMIN_HOST") != "" {
BUSINESS_ADMIN_HOST = os.Getenv("BUSINESS_ADMIN_HOST")
}
if os.Getenv("Log_PREFIX") != "" {
Log_PREFIX = os.Getenv("Log_PREFIX")
}
}