common.go
933 字节
package constant
import (
"os"
"strconv"
)
const SERVICE_NAME = "partner"
var LOG_LEVEL = "debug"
var LOG_File = "app.log"
var MMM_SMS_SERVICE_HOST = "https://sms.fjmaimaimai.com:9897"
var UCENTER_SERVICE_HOST = "https://suplus-ucenter-dev.fjmaimaimai.com"
var UCENTER_APP_KEY = "0c2c2a23dfc64ae230f5c54ab243ab52"
var BUSINESS_ADMIN_SERVICE_HOST = "http://suplus-business-admin-dev.fjmaimaimai.com"
var BUSINESS_ADMIN_PLATFORM_ID = "25" //合伙人模块
var DEFAULT_GUEST_COMPANY int = 10011
func init() {
if os.Getenv("LOG_LEVEL") != "" {
LOG_LEVEL = os.Getenv("LOG_LEVEL")
}
if os.Getenv("UCENTER_SERVICE_HOST") != "" {
UCENTER_SERVICE_HOST = os.Getenv("UCENTER_SERVICE_HOST")
}
if os.Getenv("BUSINESS_ADMIN_SERVICE_HOST") != "" {
BUSINESS_ADMIN_SERVICE_HOST = os.Getenv("BUSINESS_ADMIN_SERVICE_HOST")
}
if v := os.Getenv("DEFAULT_GUEST_COMPANY"); v != "" {
DEFAULT_GUEST_COMPANY, _ = strconv.Atoi(v)
}
}