package utils

import (
	"github.com/astaxie/beego"
)

var (
	RunMode        string //运行模式
	MYSQL_URL      string //数据库连接
	MYSQL_URL_RDDP string //数据库连接
	MYSQL_URL_EDB  string
)

var (
	CompanyId int
	AdminId int
	RealName string
)

var (
	WxAppId     string
	WxAppSecret string
	TemplateId  string
	RemindTemplateId string
)

func init() {
	RunMode = beego.AppConfig.String("run_mode")
	config, err := beego.AppConfig.GetSection(RunMode)
	if err != nil {
		panic("配置文件读取错误 " + err.Error())
	}
	beego.Info(RunMode + " 模式")
	MYSQL_URL = config["mysql_url"]
	MYSQL_URL_RDDP = config["mysql_url_rddp"]
	MYSQL_URL_EDB = config["mysql_url_edb"]

	if RunMode == "release" {
		CompanyId = 16
		RealName="超级管理员"
		WxAppId = "wx4a844c734d8c8e56"
		WxAppSecret = "26c586e7ccb3c575433f0f37797b3eeb"
		TemplateId = "P0klzaZjEI2UYth-z-WnmtOQgyxcF8klPoA_MlsA8Eo"
		RemindTemplateId="PaHpQjVffrvmeW8wiOUcqlEhnD1LXyU9FnPVF-Jg9wM"
	} else {
		CompanyId = 16
		RealName="超级管理员"
		AdminId=11
		WxAppId = "wx9b5d7291e581233a"
		WxAppSecret = "f4d52e34021eee262dce9682b31f8861"
		TemplateId = "P0klzaZjEI2UYth-z-WnmtOQgyxcF8klPoA_MlsA8Eo"
		RemindTemplateId="9JYV6sHMJlu2EHRBIj_8ift6wkrrTb9_UO-M_-YXKBw"
	}
}

//http://entryapi.brilliantstart.cn
//http://entryapi.brilliantstart.cn/swagger/
