package utils import ( "fmt" beego "github.com/beego/beego/v2/adapter" "rdluck_tools/cache" ) var ( RunMode string //运行模式 MYSQL_URL string //数据库连接 MYSQL_URL_RDDP string //数据库连接 MYSQL_URL_TACTICS string REDIS_CACHE string //缓存地址 Rc *cache.Cache //redis缓存 Re error //redis错误 ) //微信配置信息 var ( WxId string //微信原始ID WxAppId string //查研观向小程序 WxAppSecret string //查研观向小程序 WxAppIdXzs string //查研观向小助手公众号 WxAppSecretXzs string //查研观向小助手公众号 WxMsgTemplateIdApply string //申请待处理 WxMsgTemplateIdApplyCancel string //预约取消提醒 WxMsgTemplateIdPermissionApply string //预约取消提醒 WxMsgTemplateIdActivityApply string //活动预约消息提醒 WxMsgTemplateIdActivityChange string //活动预约变更提醒 WxMsgTemplateIdAskMsg string //手机号用户【XXX】发送模板消息模板ID WxMsgTemplateIdAskMsgMobile string //手机号用户【XXX】发送模板消息 WxMsgTemplateIdAskMsgMobileAll string //手机号用户【XXX】发送模板消息 ) //微信公众号配置信息 var ( WxPublicId string //微信原始ID WxPublicAppId string WxPublicAppSecret string WxPlatform = 4 //注册平台,1:日度点评公众号,2:管理后台,3:pc端网站,4:查研观向小程序 ) var ( IndexName string OnlineTime string SummaryArticleId int EmailTechnology string //科技行业专家邮箱 EmailMedicine string //医药行业专家邮箱 EmailConsumption string //消费行业专家邮箱 EmailZhizao string //智造行业专家邮箱 EmailStrategy string //策略行业专家邮箱 EmaiWhiteUserList 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_TACTICS = config["mysql_url_tactics"] REDIS_CACHE = config["beego_cache"] if len(REDIS_CACHE) <= 0 { panic("redis链接参数没有配置") } Rc, Re = cache.NewCache(REDIS_CACHE) //初始化缓存 if Re != nil { fmt.Println(Re) panic(Re) } WxAppIdXzs = "wxb7cb8a15abad5b8e" //查研观向小助手 WxAppSecretXzs = "4dd35cd1598b27bd1dc9a3b299b289fa" //查研观向小助手 OnlineTime = "2021-06-01 00:00:01" //上线时间 SummaryArticleId = 1000000 //手动添加的纪要库开始ID WxMsgTemplateIdAskMsgMobileAll = "15557270714,18767183922,18621268829" if RunMode == "release" { WxAppId = "wxcc32b61f96720d2f" WxAppSecret = "06894933fafb24dafead7eaae09c08e0" WxId = "gh_a9d3744e1072" //模板消息ID WxMsgTemplateIdApply = "PaoDanHGlt1kFw5q-4_ipJSwO3FyZpxSSNg4rwB7YCk" WxMsgTemplateIdApplyCancel = "iEi4YRHwcPbc2PSEF1pptc39H4NsAJPrUIPEk2ynwiA" WxMsgTemplateIdPermissionApply = "PaoDanHGlt1kFw5q-4_ipJSwO3FyZpxSSNg4rwB7YCk" WxMsgTemplateIdActivityApply = "MwZ5wxfd0O1Yt0Pkf6OkfWP4USQzZbiEo5SkZ26735s" WxPublicAppId = "wx4a844c734d8c8e56" WxPublicAppSecret = "26c586e7ccb3c575433f0f37797b3eeb" WxPublicId = "gh_b67e0049fb8c" IndexName = "cygx_article_v0906" //接收附件邮箱 EmailTechnology = "mlluo@hzinsights.com;jxu@hzinsights.com;agne@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com;jhwang@hzinsights.com" //科技行业专家邮箱 EmailMedicine = "xlzheng@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com;jhwang@hzinsights.com" //医药行业专家邮箱 EmailConsumption = "yrhuang@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com;jhwang@hzinsights.com" //消费行业专家邮箱 EmailZhizao = "xfma@hzinsights.com;agne@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com;jhwang@hzinsights.com" //智造行业专家邮箱 EmailStrategy = "xfma@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com;jhwang@hzinsights.com" //策略行业专家邮箱 EmaiWhiteUserList = "tshen@hzinsights.com;cxzhang@hzinsights.com;yyli@hzinsights.com" //白名单邮箱 WxMsgTemplateIdAskMsg = "PaoDanHGlt1kFw5q-4_ipJSwO3FyZpxSSNg4rwB7YCk" WxMsgTemplateIdAskMsgMobile = "" } else { WxAppId = "wxcc32b61f96720d2f" WxAppSecret = "06894933fafb24dafead7eaae09c08e0" WxId = "gh_a9d3744e1072" //模板消息ID WxMsgTemplateIdApply = "qfNuops-sKrfIkbA7U97A7gSrX03mUpoEpJksRUdloo" WxMsgTemplateIdApplyCancel = "UU_d7ks0XZBnWg2xFzxL9Heilm4kisX39K7dr4SDdO8" WxMsgTemplateIdPermissionApply = "qfNuops-sKrfIkbA7U97A7gSrX03mUpoEpJksRUdloo" WxMsgTemplateIdActivityApply = "Y59n_AHg-RLCKaz293geW76KDHpGL1qOnE7eF_lxelY" WxMsgTemplateIdActivityChange = "qfNuops-CB7bOl7f3viMG4s1uhRo7WM0Jbx3WvodKuIZ8A_z8fM" WxPublicAppId = "wx9b5d7291e581233a" WxPublicAppSecret = "f4d52e34021eee262dce9682b31f8861" WxPublicId = "gh_5dc508325c6f" IndexName = "cygx_article_v1" //接收附件邮箱 EmailTechnology = "jhwang@hzinsights.com;cxzhang@hzinsights.com" //科技行业专家邮箱 EmailMedicine = "jhwang@hzinsights.com;cxzhang@hzinsights.com" //医药行业专家邮箱 EmailConsumption = "jhwang@hzinsights.com;cxzhang@hzinsights.com" //消费行业专家邮箱 EmailZhizao = "jhwang@hzinsights.com;cxzhang@hzinsights.com" //智造行业专家邮箱 EmailStrategy = "jhwang@hzinsights.com;cxzhang@hzinsights.com" //策略行业专家邮箱 EmaiWhiteUserList = "cxzhang@hzinsights.com" WxMsgTemplateIdAskMsg = "qfNuops-sKrfIkbA7U97A7gSrX03mUpoEpJksRUdloo" WxMsgTemplateIdAskMsgMobile = "15557270714,17634786714,18767183922" } } //http://webapi.brilliantstart.cn/api/ //http://webapi.brilliantstart.cn/swagger/ //http://139.196.122.219:8603/swagger/