common.go 866 字节
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-test.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")
	}
}