config.go 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. package utils
  2. import (
  3. "fmt"
  4. "github.com/beego/beego/v2/server/web"
  5. "github.com/rdlucklib/rdluck_tools/cache"
  6. "strconv"
  7. )
  8. var (
  9. RunMode string //运行模式
  10. MYSQL_URL string //数据库连接
  11. MYSQL_URL_CYGX string //查研观向数据库连接
  12. MYSQL_URL_RDDP string //数据库连接
  13. MYSQL_URL_TACTICS string
  14. MYSQL_URL_COMEIN_DATA string // 路演记录数据库
  15. REDIS_CACHE string //缓存地址
  16. Rc *cache.Cache //redis缓存
  17. Re error //redis错误
  18. )
  19. // 微信配置信息
  20. var (
  21. WxId string //微信原始ID
  22. WxAppId string //查研观向小程序
  23. WxAppSecret string //查研观向小程序
  24. WxMfyxAppId string //买方研选小程序APPID
  25. WxMfyxAppSecret string //买方研选小程序 秘钥
  26. WxPublicIdXzs string //查研观向小助手公众号
  27. WxPublicSecretXzs string //查研观向小助手公众号
  28. WxMsgTemplateIdApply string //申请待处理
  29. WxMsgTemplateIdApplyXzs string //申请待处理(小助手)
  30. WxMsgTemplateIdApplyCancel string //预约取消提醒
  31. WxMsgTemplateIdApplyCancelXzs string //预约取消提醒(小助手)
  32. WxMsgTemplateIdPermissionApply string //预约取消提醒
  33. WxMsgTemplateIdActivityApply string //活动预约消息提醒
  34. WxMsgTemplateIdActivityApplyXzs string //活动预约消息提醒(小助手)
  35. WxMsgTemplateIdActivityChange string //活动预约变更提醒
  36. WxMsgTemplateIdAskMsg string //手机号用户【XXX】发送模板消息模板ID
  37. WxMsgTemplateIdAskMsgXzs string //手机号用户【XXX】发送模板消息模板ID(小助手)
  38. WxMsgTemplateIdAskMsgMobile string //手机号用户【XXX】发送模板消息
  39. WxMsgTemplateIdAskMsgMobileAll string //手机号用户【XXX】发送模板消rm --
  40. WxMsgTemplateIdAskMsgMobilePublic string //手机号用户【XXX】发送模板消rm --
  41. TemplateIdByProductXzs string //产品运行报告通知-模板ID(小助手)
  42. WxMsgTemplateIdArticleUserRemind string //用户阅读报告通知-模板ID
  43. WxMsgTemplateIdArticleUserRemindXzs string //用户阅读报告通知-模板ID(小助手)
  44. WxMsgTemplateIdActivityChangeApplyXzs string //查研观向活动即将开始时会前60/15分钟的通知-模板ID(小助手)
  45. WxMsgTemplateIdActivitySign string //查研观向活动签到通知-模板ID(小助手)
  46. // 类目模板
  47. WxCategoryMsgTemplateIdApplyXzs string //申请待处理(买方研选)
  48. WxCategoryMsgTemplateIdActivitySign string //买方研选活动签到通知-类目模板ID(买方研选)
  49. WxMsgCategoryTemplateIdCompanyApprovalMessageRai string //权益销售签约成功通知买方研选类目模版消息通知-类目模板ID
  50. WxMsgCategoryTemplateIdActivityPublishApply string //买方研选关注的产业下,单个活动/研选报告发布通知-类目模板ID
  51. WxMsgCategoryTemplateIdArticleUserRemind string //用户阅读报告通知-类目模板ID
  52. WxMsgCategoryTemplateIdAddMessage string //专栏文章留言-类目模板ID
  53. //权益内容组手机号
  54. RAI_MOBILE_GAO_YI_WEN string // 权益高亦文手机号
  55. RAI_MOBILE_DONG_HENG string // 权益董衡手机号
  56. RAI_MOBILE_WU_ANG_DI string // 权益吴昂迪手机号
  57. RAI_MOBILE_GE_LIN string // 权益葛琳手机号
  58. RAI_SERVE_GROUP_ID string // 权益服务组,麦高服务组 所属组的ID
  59. )
  60. // 微信公众号配置信息
  61. var (
  62. WxPublicId string //微信原始ID
  63. WxPublicAppId string
  64. WxPublicAppSecret string
  65. WxPlatform = 4 //注册平台,1:日度点评公众号,2:管理后台,3:pc端网站,4:查研观向小程序
  66. )
  67. var (
  68. IndexName string
  69. IndexNameArticleHistory string //文章阅读记录Es索引
  70. IndexNameComprehensive string //综合搜索Es索引
  71. OnlineTime string
  72. SummaryArticleId int
  73. YanxSummaryPermissionId int //研选纪要分类ID
  74. YanxViewpointPermissionId int //研选观点分类ID
  75. EmailTechnology string //科技行业专家邮箱
  76. EmailMedicine string //医药行业专家邮箱
  77. EmailConsumption string //消费行业专家邮箱
  78. EmailZhizao string //智造行业专家邮箱
  79. EmailStrategy string //策略行业专家邮箱
  80. EmailExpert string //研选行业专家邮箱
  81. EmaiWhiteUserList string //白名单邮箱
  82. IsTask bool //是否执行定时任务
  83. HtgjDefaultSaleName string //海通默认销售名称
  84. HtgjSalt string //海通加密使用的盐
  85. HtgjName string //海通国际名称
  86. HtgjPublicMobile string //海通国际公共请求的手机号
  87. ActSendMsgMobile string //研选活动带问发送模板消息接收者的手机号 (汪洋手机号)
  88. StrategyPlatform string //策略品台跳转链接地址
  89. ArticleTaskClassMobile string //策略平台报告自动归类消息通知对象
  90. YiDongZhengTongYunUrl string //易董 证通云请求域名
  91. YiDongZhengTongYunAppid string //易董 证通云请求appid
  92. YiDongZhengTongYunSecret string //易董 证通云请求secret
  93. YiDongHuaWeiYunUrl string //易董 华为云请求域名
  94. YiDonggetOriginalLink string //易董 短连接转为长链接
  95. ShangHaiCrmApiLink string //上海CRM用户同步api调用地址
  96. ZHOU_QI_ID int // 行业周期的ID
  97. )
  98. // 模板消息推送
  99. var (
  100. SendWxTemplateMsgUrl string
  101. SendWxCategoryTemplateMsgUrl string
  102. )
  103. // FICC 研报
  104. var (
  105. FiccYbEtaHubBusinessCode string //商家编码
  106. FiccYbEtaHubAppId string
  107. FiccYbEtaHubSecret string
  108. )
  109. // 日志配置
  110. var (
  111. LogPath string //调用过程中的日志存放地址
  112. LogFile string
  113. LogDataPath string //调用过程中图表相关的日志存放地址
  114. LogDataFile string
  115. BinLogPath string //数据库相关的日志存放地址
  116. BinLogFile string
  117. ApiLogPath string //接口请求地址和接口返回值日志存放地址
  118. ApiLogFile string
  119. LogMaxDays int //日志最大保留天数
  120. )
  121. func init() {
  122. tmpRunMode, err := web.AppConfig.String("run_mode")
  123. if err != nil {
  124. panic("配置文件读取run_mode错误 " + err.Error())
  125. }
  126. fmt.Println("line 80:", tmpRunMode, err)
  127. RunMode = tmpRunMode
  128. fmt.Println("RunMode:", RunMode)
  129. if RunMode == "" {
  130. localIp, err := GetLocalIP()
  131. fmt.Println("localIp:", localIp)
  132. if localIp == "10.0.0.123" {
  133. RunMode = "debug"
  134. } else {
  135. RunMode = "release"
  136. }
  137. fmt.Println("RunMode:", RunMode)
  138. configPath := `/home/code/config/hongze_cygx/conf/app.conf`
  139. fmt.Println("configPath:", configPath)
  140. err = web.LoadAppConfig("ini", configPath)
  141. if err != nil {
  142. fmt.Println("web.LoadAppConfig Err:" + err.Error())
  143. }
  144. }
  145. config, err := web.AppConfig.GetSection(RunMode)
  146. if err != nil {
  147. panic("配置文件读取错误 " + err.Error())
  148. }
  149. //beego.Info(RunMode + " 模式")
  150. MYSQL_URL = config["mysql_url"]
  151. MYSQL_URL_CYGX = config["mysql_url_cygx"]
  152. MYSQL_URL_RDDP = config["mysql_url_rddp"]
  153. MYSQL_URL_TACTICS = config["mysql_url_tactics"]
  154. MYSQL_URL_COMEIN_DATA = config["mysql_url_comein_data"]
  155. REDIS_CACHE = config["beego_cache"]
  156. if len(REDIS_CACHE) <= 0 {
  157. panic("redis链接参数没有配置")
  158. }
  159. Rc, Re = cache.NewCache(REDIS_CACHE) //初始化缓存
  160. if Re != nil {
  161. fmt.Println(Re)
  162. panic(Re)
  163. }
  164. IsTask, err = web.AppConfig.Bool("IsTask")
  165. if err != nil {
  166. panic("定时任务配置文件读取错误 " + err.Error())
  167. }
  168. fmt.Println("IsTask:", IsTask)
  169. OnlineTime = "2021-06-01 00:00:01" //上线时间
  170. SummaryArticleId = 1000000 //手动添加的纪要库开始ID
  171. YanxSummaryPermissionId = 1001 //研选纪要分类ID
  172. YanxViewpointPermissionId = 1002 //研选观点分类ID
  173. WxMsgTemplateIdAskMsgMobileAll = "15557270714,18767183922,18621268829"
  174. WxMsgTemplateIdAskMsgMobilePublic = "15557270714,18767183922,18621268829" // 王芳沈涛张传星
  175. HtgjDefaultSaleName = "王芳"
  176. HtgjSalt = "HTGJ&HZ"
  177. HtgjName = "海通国际"
  178. HtgjPublicMobile = "18767183955"
  179. StrategyPlatform = "https://vmp.hzinsights.com/v2/articles/"
  180. // 买方研选
  181. WxMfyxAppId = "wx5e3240ab90c247ac"
  182. WxMfyxAppSecret = "6b1316b46dc9c63429f5c1df6f51b4ac"
  183. if RunMode == "release" {
  184. WxAppId = "wxcc32b61f96720d2f"
  185. WxAppSecret = "06894933fafb24dafead7eaae09c08e0"
  186. WxId = "gh_a9d3744e1072"
  187. //模板消息ID
  188. WxMsgTemplateIdApply = "PaoDanHGlt1kFw5q-4_ipJSwO3FyZpxSSNg4rwB7YCk"
  189. WxMsgTemplateIdApplyCancel = "iEi4YRHwcPbc2PSEF1pptc39H4NsAJPrUIPEk2ynwiA"
  190. WxMsgTemplateIdPermissionApply = "PaoDanHGlt1kFw5q-4_ipJSwO3FyZpxSSNg4rwB7YCk"
  191. WxMsgTemplateIdActivityApply = "MwZ5wxfd0O1Yt0Pkf6OkfWP4USQzZbiEo5SkZ26735s"
  192. WxPublicAppId = "wx4a844c734d8c8e56"
  193. WxPublicAppSecret = "26c586e7ccb3c575433f0f37797b3eeb"
  194. WxPublicId = "gh_b67e0049fb8c"
  195. IndexName = "cygx_article_v03_23"
  196. IndexNameArticleHistory = "cygx_article_history_v07_08"
  197. IndexNameComprehensive = "cygx_comprehensive"
  198. //接收附件邮箱
  199. EmailTechnology = "mlluo@hzinsights.com;jxu@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com;hwang@hzinsights.com;rli@hzinsights.com" //科技行业专家邮箱
  200. EmailMedicine = "xlzheng@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com;yxyan@hzinsights.com;ppwang@hzinsights.com;tkding@hzinsights.com;xfma@hzinsights.com" //医药行业专家邮箱
  201. EmailConsumption = "yrhuang@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com;jxu@hzinsights.com;hychen@hzinsights.com;lwang@hzinsights.com" //消费行业专家邮箱
  202. EmailZhizao = "xfma@hzinsights.com;tkding@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com" //智造行业专家邮箱
  203. EmailStrategy = "experts@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com" //策略行业专家邮箱
  204. EmailExpert = "experts@hzinsights.com;tshen@hzinsights.com;cxzhang@hzinsights.com" //研选行业专家邮箱
  205. EmaiWhiteUserList = "tshen@hzinsights.com;cxzhang@hzinsights.com;yyli@hzinsights.com" //白名单邮箱
  206. WxMsgTemplateIdAskMsg = "PaoDanHGlt1kFw5q-4_ipJSwO3FyZpxSSNg4rwB7YCk"
  207. WxMsgTemplateIdArticleUserRemind = "fxnlsjx-gm3dAZVJf6f3w27wA7anETl42kexXLP8FDs"
  208. WxMsgTemplateIdAskMsgMobile = ""
  209. //ActSendMsgMobile = "15618524605"
  210. ActSendMsgMobile = "15557270714" // 汪洋手机号
  211. ArticleTaskClassMobile = "15557270714,18767183922,15216736473,15000123056,18701809782,17706316791,18652179672"
  212. RAI_SERVE_GROUP_ID = "68,72"
  213. ShangHaiCrmApiLink = "https://crm.hzinsights.com/"
  214. SendWxTemplateMsgUrl = "http://127.0.0.1:8086/v1/wechat/send_template_msg"
  215. SendWxCategoryTemplateMsgUrl = "http://127.0.0.1:8086/v1/wechat/send_category_template_msg"
  216. } else {
  217. WxAppId = "wxcc32b61f96720d2f"
  218. WxAppSecret = "06894933fafb24dafead7eaae09c08e0"
  219. WxId = "gh_a9d3744e1072"
  220. //模板消息ID
  221. WxMsgTemplateIdApply = "qfNuops-sKrfIkbA7U97A7gSrX03mUpoEpJksRUdloo"
  222. WxMsgTemplateIdApplyCancel = "UU_d7ks0XZBnWg2xFzxL9Heilm4kisX39K7dr4SDdO8"
  223. WxMsgTemplateIdPermissionApply = "qfNuops-sKrfIkbA7U97A7gSrX03mUpoEpJksRUdloo"
  224. WxMsgTemplateIdActivityApply = "Y59n_AHg-RLCKaz293geW76KDHpGL1qOnE7eF_lxelY"
  225. WxMsgTemplateIdActivityChange = "CB7bOl7f3viMG4s1uhRo7WM0Jbx3WvodKuIZ8A_z8fM"
  226. WxMsgTemplateIdArticleUserRemind = "CB7bOl7f3viMG4s1uhRo7WM0Jbx3WvodKuIZ8A_z8fM"
  227. WxPublicAppId = "wx9b5d7291e581233a"
  228. WxPublicAppSecret = "f4d52e34021eee262dce9682b31f8861"
  229. WxPublicId = "gh_5dc508325c6f"
  230. IndexName = "cygx_article_v1"
  231. IndexNameArticleHistory = "cygx_article_history_v1"
  232. IndexNameComprehensive = "cygx_comprehensive_test"
  233. //接收附件邮箱
  234. EmailTechnology = "jhwang@hzinsights.com;cxzhang@hzinsights.com" //科技行业专家邮箱
  235. EmailMedicine = "jhwang@hzinsights.com;cxzhang@hzinsights.com" //医药行业专家邮箱
  236. EmailConsumption = "jhwang@hzinsights.com;cxzhang@hzinsights.com" //消费行业专家邮箱
  237. EmailZhizao = "jhwang@hzinsights.com;cxzhang@hzinsights.com" //智造行业专家邮箱
  238. EmailStrategy = "jhwang@hzinsights.com;cxzhang@hzinsights.com" //策略行业专家邮箱
  239. EmailExpert = "jhwang@hzinsights.com;cxzhang@hzinsights.com" //研选行业专家邮箱
  240. EmaiWhiteUserList = "cxzhang@hzinsights.com"
  241. WxMsgTemplateIdAskMsg = "qfNuops-sKrfIkbA7U97A7gSrX03mUpoEpJksRUdloo"
  242. WxMsgTemplateIdAskMsgMobile = "15557270714,17634786714,18767183922,17516315016"
  243. ActSendMsgMobile = "15557270714"
  244. ArticleTaskClassMobile = "15557270714,18767183922,17706316791"
  245. RAI_SERVE_GROUP_ID = "132,134"
  246. ShangHaiCrmApiLink = "http://106.15.192.100:8100/"
  247. SendWxTemplateMsgUrl = "http://127.0.0.1:8086/v1/wechat/send_template_msg"
  248. SendWxCategoryTemplateMsgUrl = "http://127.0.0.1:8086/v1/wechat/send_category_template_msg"
  249. //SendWxCategoryTemplateMsgUrl = "http://8.136.199.33:8086/v1/wechat/send_category_template_msg"
  250. }
  251. //查研观向小助手
  252. if RunMode != "release" {
  253. //原有的模板ID
  254. WxPublicIdXzs = "wx9b5d7291e581233a" //查研观向小助手
  255. WxPublicSecretXzs = "f4d52e34021eee262dce9682b31f8861" //查研观向小助手
  256. WxMsgTemplateIdActivityApplyXzs = "U3su--7d6xsCDcP6Tya0N0wWpKn_uI0zO1cutRK52cc" //活动预约消息提醒(小助手)
  257. WxMsgTemplateIdAskMsgXzs = "qfNuops-sKrfIkbA7U97A7gSrX03mUpoEpJksRUdloo" //手机号用户【XXX】发送模板消息模板ID(小助手)
  258. WxMsgTemplateIdApplyXzs = "qfNuops-sKrfIkbA7U97A7gSrX03mUpoEpJksRUdloo" //申请待处理(小助手)
  259. WxMsgTemplateIdApplyCancelXzs = "UU_d7ks0XZBnWg2xFzxL9Heilm4kisX39K7dr4SDdO8" ////预约取消提醒(小助手)
  260. TemplateIdByProductXzs = "-YjuPOB7Fqd-S3ilabYa6wvjDY9aXmeEfPN6DCiy-EY" //产品运行报告通知-模板ID(小助手)
  261. WxMsgTemplateIdActivityChangeApplyXzs = "4fwzgJ-2xUiyQqNkFCPd8vsGpOnNWWE2inZO4BXjfio" //查研观向活动变更通知-模板ID(小助手)
  262. WxMsgTemplateIdActivitySign = "3l5cxpqH6c9kkLe9ow7qzqd0uYEOdY3A_PB8wRWkiHk" //查研观向活动签到通知-模板ID(小助手)
  263. // 类目模版
  264. WxCategoryMsgTemplateIdApplyXzs = "IemWOTzbnLBqJ2ozSiFqm13WjaotoC3V4uXaxTij08I"
  265. WxCategoryMsgTemplateIdActivitySign = "aczgUYZASO97UJiCD_nDmD1eNWZAWudzw3JYcvjJ2x4"
  266. WxMsgCategoryTemplateIdCompanyApprovalMessageRai = "wU4x_c5XruwuA44VZelyklRNOfq4XrU9ILckTtDs6hg" //权益销售签约成功通知买方研选类目模版消息通知-类目模板ID
  267. WxMsgCategoryTemplateIdActivityPublishApply = "wLeV7tVK4ZJBoAvsmfXkHveVW8yefGAkwnVKQWRi8uQ"
  268. WxMsgCategoryTemplateIdArticleUserRemind = "4fwzgJ-2xUiyQqNkFCPd8vsGpOnNWWE2inZO4BXjfio"
  269. WxMsgCategoryTemplateIdAddMessage = "Ery3Y-cBtPqdpXJd07jKqbZdxkcTpK_74wAQNWYDOvY"
  270. //权益内容组手机号测试环境没什么用,配合测试切换他们的手机号
  271. RAI_MOBILE_GAO_YI_WEN = "17706316791" //权益高亦文手机号
  272. RAI_MOBILE_DONG_HENG = "15557270714" // 权益董衡手机号
  273. RAI_MOBILE_WU_ANG_DI = "15557270714" // 权益吴昂迪手机号
  274. RAI_MOBILE_GE_LIN = "15557270714" // 权益葛琳手机号
  275. } else {
  276. //新的模板ID
  277. WxPublicIdXzs = "wxb7cb8a15abad5b8e" //查研观向小助手
  278. WxPublicSecretXzs = "f425ba2863084249722af1e2a5cfffd3" //查研观向小助手
  279. WxMsgTemplateIdActivityApplyXzs = "mItHdTF6swcunM4P36lOjnLknGbHaLqYdbOsRKscBq4" //活动预约消息提醒(小助手)
  280. WxMsgTemplateIdAskMsgXzs = "IpS-yuNNQc8osCoy20jPHNkvBUyKRL1NGn7c0G9xmQA" //手机号用户【XXX】发送模板消息模板ID(小助手)
  281. WxMsgTemplateIdApplyXzs = "IpS-yuNNQc8osCoy20jPHNkvBUyKRL1NGn7c0G9xmQA" //申请待处理(小助手)
  282. WxMsgTemplateIdApplyCancelXzs = "gCSCAWNNhjkzE2V1cjbIV_Ex68R_8LM_u25qDlSKWyM" ////预约取消提醒(小助手)
  283. TemplateIdByProductXzs = "tNcCUiK_uUkuxaFF7M9NP2RwLkw8uHFjG-TDIxGUKxo" //产品运行报告通知-模板ID(小助手)
  284. WxMsgTemplateIdActivityChangeApplyXzs = "Q03y1p7epHx8jnz-mHTwm8O5XEfd-XnrQB01Goldmqo" //查研观向活动变更通知-模板ID(小助手)
  285. WxMsgTemplateIdActivitySign = "GIcOqewJql4rQ_dvhUna2knWIVogKulaqRxtZKnWZeo" //查研观向活动签到通知-模板ID(小助手)
  286. // 类目模版
  287. WxCategoryMsgTemplateIdApplyXzs = "HKD03oZfSv8LJgeoHz0pynai3G2Ls4h8zZ6BfOpZmIA"
  288. WxCategoryMsgTemplateIdActivitySign = "11rITVC5Gl8qwetxl92NqY887Uk14kg3nPtEA_i_zLo"
  289. WxMsgCategoryTemplateIdCompanyApprovalMessageRai = "t1CcxcOkoZkWZrDRs6zYUlceBGYMV3mhkBYUa8a6Mx0" //权益销售签约成功通知买方研选类目模版消息通知-类目模板ID
  290. WxMsgCategoryTemplateIdActivityPublishApply = "IBMqiE61lVgUfFM4rsH0XCH57R_G3PbWvRbnzg9JHPI"
  291. WxMsgCategoryTemplateIdArticleUserRemind = "4fwzgJ-YQndzH5OJWLkd0grvftgqhvP285t_oXUboi7DaaIhMI"
  292. WxMsgCategoryTemplateIdAddMessage = "_SzJRvXmlIp4Uh7Xbyem9G2pOqMDsHRsL0BQkCPFslk"
  293. //权益内容组手机号
  294. RAI_MOBILE_GAO_YI_WEN = "15000123056" //权益高亦文手机号
  295. RAI_MOBILE_DONG_HENG = "15216736473" // 权益董衡手机号
  296. RAI_MOBILE_WU_ANG_DI = "18701809782" // 权益吴昂迪手机号
  297. RAI_MOBILE_GE_LIN = "18258485832" // 权益葛琳手机号
  298. }
  299. //日志配置
  300. {
  301. LogPath = config["log_path"]
  302. LogFile = config["log_file"]
  303. LogDataPath = config["log_data_path"]
  304. LogDataFile = config["log_data_file"]
  305. BinLogPath = config["binlog_path"]
  306. BinLogFile = config["binlog_file"]
  307. ApiLogPath = config["apilog_path"]
  308. ApiLogFile = config["apilog_file"]
  309. logMaxDaysStr := config["log_max_day"]
  310. LogMaxDays, _ = strconv.Atoi(logMaxDaysStr)
  311. }
  312. //易董开放api配置
  313. YiDongApiConfig()
  314. ChartPermissionId()
  315. FiccYbEtaHub()
  316. }
  317. // YiDongApiConfig 易董开放api配置
  318. func YiDongApiConfig() {
  319. if RunMode == "release" {
  320. YiDongZhengTongYunUrl = "https://services.valueonline.cn/"
  321. YiDongZhengTongYunAppid = "ca86a257ebb46fce"
  322. YiDongZhengTongYunSecret = "338db2b2ca86a257ebb46fced9003f53"
  323. YiDongHuaWeiYunUrl = "https://achievement.valueonline.cn/"
  324. YiDonggetOriginalLink = "https://services.easy-board.com.cn/short-link/getOriginalLink?shortKey="
  325. } else {
  326. YiDongZhengTongYunUrl = "https://services-dev.valueonline.cn/"
  327. YiDongZhengTongYunAppid = "d9bfb79627ac30d0"
  328. YiDongZhengTongYunSecret = "96a61dd2d9bfb79627ac30d02188bbe2"
  329. YiDongHuaWeiYunUrl = "https://achievement-test.valueonline.cn/"
  330. YiDonggetOriginalLink = "https://services-dev.valueonline.cn/short-link/getOriginalLink?shortKey="
  331. }
  332. }
  333. // 行业ID信息
  334. func ChartPermissionId() {
  335. if RunMode == "release" {
  336. ZHOU_QI_ID = 62
  337. } else {
  338. ZHOU_QI_ID = 148
  339. }
  340. }
  341. // 行业ID信息 易董开放api配置
  342. func FiccYbEtaHub() {
  343. if RunMode == "release" {
  344. ZHOU_QI_ID = 62
  345. } else {
  346. FiccYbEtaHubAppId = "IaiJJNFKBXuUgFaG"
  347. FiccYbEtaHubSecret = "CJYZocTkUoBZrxaFGzsvFdQCNtqlISqo"
  348. }
  349. }
  350. //
  351. //YiDongZhengTongYunUrl string //易董 证通云请求域名
  352. //YiDongZhengTongYunAppid string //易董 证通云请求appid
  353. //YiDongZhengTongYunSecret string //易董 证通云请求secret
  354. //YiDongHuaWeiYunUrl string //易董 华为云请求域名
  355. //http://webapi.brilliantstart.cn/api/
  356. //http://webapi.brilliantstart.cn/swagger/
  357. //http://139.196.122.219:8603/swagger/