common.go
865 字节
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
package constant
import "os"
const SERVICE_NAME = "performance"
var LOG_LEVEL = "debug"
// 过期时间 7天时间
var AdminJwtExpiresIn = int64(3600 * 24 * 7)
var AdminJWTSecretKey = "sg-storage"
// 上传临时Zip文件
var UPLOAD_ZIP_PATH = "./uploads/zip"
// Env 判断当前环境变量
var Env = "dev"
var MMM_OPEN_API_SERVICE_HOST = "http://mmm-open-api-dev.fjmaimaimai.com"
// 绩效管理平台ID
var PLATFORM_ADMIN_ID = 28
// 员工绩效平台ID
var PLATFORM_FONT_ID = 29
// app 应用消息通知
var APP_MESSAGE_KEY = "mmm.ability.performance"
func init() {
if os.Getenv("LOG_LEVEL") != "" {
LOG_LEVEL = os.Getenv("LOG_LEVEL")
}
if os.Getenv("ENV_MOD") != "" {
Env = os.Getenv("ENV_MOD")
}
//开放平台
if os.Getenv("MMM_OPEN_API_SERVICE_HOST") != "" {
MMM_OPEN_API_SERVICE_HOST = os.Getenv("MMM_OPEN_API_SERVICE_HOST")
}
}