config.go 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524
  1. package utils
  2. import (
  3. "fmt"
  4. beeLogger "github.com/beego/bee/v2/logger"
  5. "github.com/beego/beego/v2/server/web"
  6. "github.com/rdlucklib/rdluck_tools/cache"
  7. )
  8. var (
  9. RunMode string //运行模式
  10. MYSQL_URL string //数据库连接
  11. MYSQL_URL_RDDP string //数据库连接
  12. MYSQL_URL_EDB string
  13. MYSQL_URL_DATA string
  14. MYSQL_URL_GL string
  15. MYSQL_LOG_URL string
  16. MYSQL_URL_COMEIN_DATA string // 路演记录数据库
  17. MYSQL_URL_WEEKLY_TRIAL string // ETA试用
  18. MYSQL_URL_FMS string // 财务系统
  19. MYSQL_URL_CYGX string // 查研观向
  20. REDIS_CACHE string //缓存地址
  21. Rc *cache.Cache //redis缓存
  22. Re error //redis错误
  23. )
  24. var (
  25. STATIC_DIR string
  26. )
  27. // 微信配置信息
  28. var (
  29. WxId string //微信原始ID
  30. WxAppId string
  31. WxAppSecret string
  32. TemplateIdByProduct string //产品运行报告通知-模板ID
  33. Wx_MFYX_Refund_NotifyUrl string //买方研选微信商户退款回调地址
  34. TemplateRedirectUrl string //模板消息跳转地址
  35. DayReportTemplateRedirectUrl string //模板消息跳转地址(晨报、周报)
  36. TemplateIdByCompanyApply string //客户申请单审批通知-模板ID
  37. TemplateCompanyApplyRedirectUrl string //审批单模板消息跳转地址
  38. TemplateIdByCompanyReceive string //销售跨部门领取客户通知-模板ID
  39. TemplateIdByCompanyReceivePermission string //销售"添加客户/领取客户"权限变更通知
  40. WxMsgTemplateIdActivityChangeApply string //查研观向活动变更通知-模板ID
  41. WxMsgTemplateIdActivityChangeApplyXzs string //查研观向活动变更通知-模板ID(小助手)
  42. TemplateIdByProductXzs string //产品运行报告通知-模板ID(小助手)
  43. WxMsgTemplateIdActivityApplyXzs string //查研观向销售帮对应客户报名通知-模板ID
  44. WxMsgTemplateIdCompanyApprovalMessageRai string //权益销售签约成功通知查研观向小助手模版消息
  45. WxCygxAppId string //查研观向小程序APPID
  46. WxCygxAppSecret string //查研观向小程序 秘钥
  47. WxMsgTemplateIdAskByUser string //查研观向用户提问新消息推送ID
  48. WxCrmAppId string //随手办公小程序APPID
  49. WxPublicIdXzs string //查研观向小助手公众号
  50. WxPublicSecretXzs string //查研观向小助手公众号
  51. WxYbAppId string //弘则研报小程序APPID
  52. YiDongHuaWeiYunUrl string //易董 华为云请求域名
  53. YiDongZhengTongYunUrl string //易董 证通云请求域名
  54. YiDongZhengTongYunClientId string //易董 证通云client_id
  55. YiDongZhengTongYunClientSecret string //易董 证通云client_secret
  56. WxMsgTemplateIdWithRoadshowPending string //路演->研究员收到待处理的申请
  57. WxMsgTemplateIdWithRoadshowDetailResult string //路演->销售收到处理结果
  58. WxMsgTemplateIdWithRoadshowDeleteNotice string //路演->研究员收到活动删除通知
  59. CYGX_WEB_URL string //查研观向web端网址
  60. CYGX_MFYX_URL string //查研观向web端网址
  61. WxMsgCategoryTemplateIdActivityChangeApply string //买方研选活动变更通知-类目模板ID
  62. WxMsgCategoryTemplateIdActivityCancleApply string //买方研选活动取消通知-类目模板ID
  63. WxMsgCategoryTemplateIdActivityPublishApply string //买方研选关注的产业下,单个活动/研选报告发布通知-类目模板ID
  64. WxMsgCategoryTemplateIdCompanyApprovalMessageRai string //权益销售签约成功通知买方研选类目模版消息
  65. WxMsgCategoryTemplateIdActivityApply string //后台研选活动给客户报名或取消报名模版消息
  66. WxMsgTemplateIdWithYbCommunityQuestion string // 研报小程序->问答社区回复通知
  67. WxMsgTemplateIdWithSealApplyFinished string // 用印申请-已签回通知
  68. //内部员工公众号(弘则部门)
  69. AdminWxAppId string
  70. AdminWxAppSecret string
  71. UserTemplateIdByProduct string //客户产品运行报告通知-模板ID
  72. )
  73. var (
  74. THS_SendUrl string //同花顺地址url
  75. THS_PubKey string //同花顺公钥
  76. )
  77. var (
  78. IndexName string //Es索引
  79. IndexNameArticleHistory string //文章阅读记录Es索引
  80. IndexNameComprehensive string //综合搜索Es索引
  81. SummaryArticleId int //手动添加的纪要库开始ID
  82. YanxSummaryPermissionId int //研选纪要分类ID
  83. YanxViewpointPermissionId int //研选观点分类ID
  84. DATA_INDEX_NAME string //数据指标库索引
  85. CHART_INDEX_NAME string //研究图库索引
  86. EsReportIndexName string //研报ES索引
  87. EsEnglishReportIndexName string //英文研报ES索引
  88. Hz_CeLue_Article_Url string //策略平台报告地址
  89. MY_CHART_INDEX_NAME string //研究图库(MY ETA)索引
  90. EsSemanticAnalysisDocIndexName string //ES语义分析文档索引名
  91. )
  92. var (
  93. Bucketname string = "hongze"
  94. Endpoint string
  95. Imghost string = "https://hongze.oss-accelerate.aliyuncs.com/"
  96. Upload_dir string = "static/images/"
  97. Upload_Audio_Dir string = "static/audio/"
  98. AccessKeyId string = "LTAIFMZYQhS2BTvW"
  99. AccessKeySecret string = "12kk1ptCHoGWedhBnKRVW5hRJzq9Fq"
  100. )
  101. // LibreOfficePath LibreOfficePath的地址
  102. var LibreOfficePath string
  103. // 经济数据库
  104. var (
  105. EDB_LIB_URL string
  106. )
  107. // 上海crm开放api配置
  108. var (
  109. CRM_OPEN_API_URL string
  110. CRM_OPEN_API_APP_KEY string
  111. CRM_OPEN_API_APP_SECRET string
  112. )
  113. // 全时会议账号信息
  114. var (
  115. QsAppID string
  116. QsSecretKey string
  117. QsUserId int64
  118. QsUserName string
  119. )
  120. // 进门财经账号信息
  121. var (
  122. COMEIN_URL string
  123. COMEIN_APPID string
  124. COMEIN_SECREKEY string
  125. )
  126. // 公共api内部服务调用
  127. var (
  128. // SendWxTemplateMsgUrl 模板消息推送
  129. SendWxTemplateMsgUrl string
  130. SendWxCategoryTemplateMsgUrl string
  131. // HandleVideoDecibelUrl 处理音频分贝的url
  132. HandleVideoDecibelUrl string
  133. )
  134. // ppt转图片服务的地址
  135. var Ppt2ImageUrl string
  136. // 开放openapi的地址
  137. var HongzeOpenApiHost string
  138. var EnglishShareUrl string //英文研报群发邮件分享地址
  139. var EnPolicyReportUrl string
  140. // MayCurBaseUrl 每刻报销地址
  141. var MayCurBaseUrl string
  142. // CrmEtaServerUrl CRM-ETA服务地址
  143. var CrmEtaServerUrl string
  144. func init() {
  145. tmpRunMode, err := web.AppConfig.String("run_mode")
  146. if err != nil {
  147. panic(any("配置文件读取run_mode错误 " + err.Error()))
  148. }
  149. RunMode = tmpRunMode
  150. fmt.Println("RunMode:", RunMode)
  151. if RunMode == "" {
  152. localIp, err := GetLocalIP()
  153. fmt.Println("localIp:", localIp)
  154. if localIp == "10.0.0.123" {
  155. RunMode = "debug"
  156. } else {
  157. RunMode = "release"
  158. }
  159. fmt.Println("RunMode:", RunMode)
  160. configPath := `/home/code/config/hz_crm_api/conf/app.conf`
  161. fmt.Println("configPath:", configPath)
  162. err = web.LoadAppConfig("ini", configPath)
  163. if err != nil {
  164. fmt.Println("web.LoadAppConfig Err:" + err.Error())
  165. }
  166. }
  167. config, err := web.AppConfig.GetSection(RunMode)
  168. if err != nil {
  169. panic(any("配置文件读取错误 " + err.Error()))
  170. }
  171. beeLogger.Log.Info(RunMode + " 模式")
  172. MYSQL_URL = config["mysql_url"]
  173. MYSQL_URL_RDDP = config["mysql_url_rddp"]
  174. MYSQL_URL_EDB = config["mysql_url_edb"]
  175. MYSQL_URL_DATA = config["mysql_url_data"]
  176. MYSQL_URL_GL = config["mysql_url_gl"]
  177. MYSQL_LOG_URL = config["mysql_url_log"]
  178. MYSQL_URL_COMEIN_DATA = config["mysql_url_comein_data"]
  179. MYSQL_URL_WEEKLY_TRIAL = config["mysql_url_weekly_trial"]
  180. MYSQL_URL_FMS = config["mysql_url_fms"]
  181. MYSQL_URL_CYGX = config["mysql_url_cygx"]
  182. REDIS_CACHE = config["beego_cache"]
  183. if len(REDIS_CACHE) <= 0 {
  184. panic(any("redis链接参数没有配置"))
  185. }
  186. Rc, Re = cache.NewCache(REDIS_CACHE) //初始化缓存
  187. if Re != nil {
  188. fmt.Println(Re)
  189. panic(any(Re))
  190. }
  191. WxCygxAppId = "wxcc32b61f96720d2f" //查研观向小程序
  192. WxCygxAppSecret = "06894933fafb24dafead7eaae09c08e0" //查研观向小程序
  193. SummaryArticleId = 1000000 //手动添加的纪要库开始ID
  194. YanxSummaryPermissionId = 1001 //研选纪要分类ID
  195. YanxViewpointPermissionId = 1002 //研选观点分类ID
  196. Hz_CeLue_Article_Url = "https://vmp.hzinsights.com/v2/articles/" //策略平台项目报告地址
  197. //随手办公 微信小程序appid
  198. WxCrmAppId = `wx67b68e39913e511e`
  199. WxYbAppId = `wxb059c872d79b9967` //弘则研报小程序
  200. //内部员工公众号(弘则部门)
  201. AdminWxAppId = "wx1392111da5426e9e"
  202. AdminWxAppSecret = "30eceb7cf29bf2f046031155ab55d7b4"
  203. THS_PubKey = `-----BEGIN PUBLIC KEY-----
  204. MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqugglfCboOEfWtHlGBOW
  205. 40a4Y3xOs0MPBwjTOzHgcaWzx5XCc20VftGVXkWlpjs8u4dza/Bp1SV7SJ5Y7U95
  206. jgUOP8Js9Qgp6UVqBJDJf3i1KpjHzlk3ma8zxAYUAdieEUE+SKSxSY+BD9A6lpf5
  207. n+igXLmzR5GeVGFeLzoMhB1+pXgGhW30ao9wPwuRF7DBl+FKa/ACi7iXLiwXVgqT
  208. FFi29TKeerEENu3EpMXvPml7tNUiVmVW6d83hlascfbAlkShwuHLSGpLqK7brtg6
  209. jRS9hreKFKb0BUQ4TB26e7IDCstbMRvUp4+OGezexzic5NYPQ8uLo5OTaS7f7PrW
  210. ZwIDAQAB
  211. -----END PUBLIC KEY-----`
  212. if RunMode == "release" {
  213. TemplateRedirectUrl = "https://ficc.hzinsights.com/reportdtl?id="
  214. DayReportTemplateRedirectUrl = "https://report.hzinsights.com/#/allindex/" //晨报模板跳转url
  215. TemplateCompanyApplyRedirectUrl = "https://ficc.hzinsights.com/approval/approval/list"
  216. STATIC_DIR = "/home/static/imgs/"
  217. Endpoint = "oss-cn-shanghai-internal.aliyuncs.com"
  218. //Endpoint = "oss-cn-shanghai.aliyuncs.com"
  219. IndexName = "cygx_article_v03_23"
  220. IndexNameArticleHistory = "cygx_article_history_v07_08"
  221. IndexNameComprehensive = "cygx_comprehensive"
  222. CYGX_WEB_URL = "https://web.hzinsights.com"
  223. CYGX_MFYX_URL = "https://www.research-select.com"
  224. TemplateCompanyApplyRedirectUrl = "https://ficc.hzinsights.com/approval/approval/list"
  225. //同花顺正式地址
  226. THS_SendUrl = `https://board.10jqka.com.cn/gateway/ps/syncNews`
  227. DATA_INDEX_NAME = "hz_data_lib_v20220214"
  228. CHART_INDEX_NAME = "hz_chart_lib_v2"
  229. MY_CHART_INDEX_NAME = "hz_my_chart_v1"
  230. //同花顺,万得接口服务地址(阿里云windows服务器地址;内网地址)
  231. Hz_Server_Data_Url = "http://172.19.173.231:7000/"
  232. EDB_LIB_URL = "http://172.19.173.232:8300/edbapi/"
  233. EsReportIndexName = "research_report_v1"
  234. EsEnglishReportIndexName = "english_report_v1"
  235. EsSemanticAnalysisDocIndexName = "semantic_analysis_v1"
  236. WxRelease()
  237. SendWxTemplateMsgUrl = "http://127.0.0.1:8086/v1/wechat/send_template_msg"
  238. SendWxCategoryTemplateMsgUrl = "http://127.0.0.1:8086/v1/wechat/send_category_template_msg"
  239. HandleVideoDecibelUrl = "http://172.19.173.232:8086/v1/report/handle_video_decibel"
  240. HongzeOpenApiHost = "http://127.0.0.1:8609"
  241. EnglishShareUrl = "https://ybpcen.hzinsights.com"
  242. EnPolicyReportUrl = "https://en.hzinsights.com/v2api/"
  243. MayCurBaseUrl = "https://ng.maycur.com"
  244. // CRM-ETA服务地址
  245. CrmEtaServerUrl = "http://127.0.0.1:8708"
  246. } else {
  247. TemplateRedirectUrl = "http://rddpweb.brilliantstart.cn/reportdtl?id="
  248. DayReportTemplateRedirectUrl = "http://report.brilliantstart.cn/#/allindex/" //晨报模板跳转url
  249. TemplateCompanyApplyRedirectUrl = "http://advisoryadmin.brilliantstart.cn/approval/approval/list"
  250. STATIC_DIR = "static/imgs/"
  251. Endpoint = "oss-cn-shanghai.aliyuncs.com"
  252. IndexName = "cygx_article_v1"
  253. IndexNameArticleHistory = "cygx_article_history_v1"
  254. IndexNameComprehensive = "cygx_comprehensive_test"
  255. CYGX_WEB_URL = "https://clpttest.hzinsights.com"
  256. CYGX_MFYX_URL = "http://test.research-select.com"
  257. //同花顺测试地址
  258. THS_SendUrl = `https://mtest.10jqka.com.cn/gateway/ps/syncNews`
  259. DATA_INDEX_NAME = "test_hz_data_lib_v20220120"
  260. CHART_INDEX_NAME = "test_hz_chart_lib_v2"
  261. MY_CHART_INDEX_NAME = "test_hz_my_chart_v1"
  262. //同花顺,万得接口服务地址(阿里云windows服务器地址;外网地址)
  263. Hz_Server_Data_Url = "http://139.196.136.213:7000/"
  264. EDB_LIB_URL = "http://8.136.199.33:8300/edbapi/"
  265. //EDB_LIB_URL = "http://127.0.0.1:8900/edbapi/"
  266. EsReportIndexName = "test_research_report_v1"
  267. EsEnglishReportIndexName = "test_english_report_v1"
  268. EsSemanticAnalysisDocIndexName = "test_semantic_analysis_v1"
  269. WxDebug()
  270. SendWxTemplateMsgUrl = "http://127.0.0.1:8086/v1/wechat/send_template_msg"
  271. SendWxCategoryTemplateMsgUrl = "http://127.0.0.1:8086/v1/wechat/send_category_template_msg"
  272. HandleVideoDecibelUrl = "http://127.0.0.1:8086/v1/report/handle_video_decibel"
  273. HongzeOpenApiHost = "http://127.0.0.1:8608"
  274. EnglishShareUrl = "http://8.136.199.33:8301"
  275. //EnPolicyReportUrl = "https://beta.internal.hzinsights.com/v2api/"
  276. EnPolicyReportUrl = "https://en.hzinsights.com/v2api/"
  277. //MayCurBaseUrl = "https://ng-uat.maycur.com"
  278. MayCurBaseUrl = "https://ng.maycur.com"
  279. // CRM-ETA服务地址
  280. CrmEtaServerUrl = "http://127.0.0.1:8702"
  281. }
  282. tmpLibreOfficePath, err := web.AppConfig.String("libreOfficePath")
  283. if err != nil {
  284. panic(any("配置文件读取libreOfficePath错误 " + err.Error()))
  285. }
  286. LibreOfficePath = tmpLibreOfficePath
  287. //上海crm开放api配置
  288. CrmOpenApiConfig()
  289. //初始化全时开放api配置
  290. initQsOpenApiConfig()
  291. //进门财经开放api配置
  292. ComeinOpenApiConfig()
  293. //易董开放api配置
  294. YiDongApiConfig()
  295. // 初始化内部服务配置
  296. initSystemServer()
  297. //微信商户内部配置
  298. WxPayConfig()
  299. }
  300. // 测试环境模板消息
  301. func WxDebug() {
  302. WxAppId = "wx9b5d7291e581233a"
  303. WxAppSecret = "f4d52e34021eee262dce9682b31f8861"
  304. WxId = "gh_5dc508325c6f"
  305. //模板消息
  306. {
  307. TemplateIdByProduct = "-YjuPOB7Fqd-S3ilabYa6wvjDY9aXmeEfPN6DCiy-EY"
  308. WxMsgTemplateIdAskByUser = `qfNuops-sKrfIkbA7U97A7gSrX03mUpoEpJksRUdloo`
  309. TemplateIdByCompanyApply = "yqaDUavXAKBpsPqTr0zYXAGIQYeCijZtWwFsT07wTbE"
  310. //销售跨部门领取客户通知
  311. TemplateIdByCompanyReceive = "-ccp916f5rjMhwj8CtOAW_d_Os6ran8q5okVCENg924"
  312. //销售"添加客户/领取客户"权限变更通知
  313. TemplateIdByCompanyReceivePermission = "rciDm9ThigRBGi1SZ4TFd74XA4aoAxSz_ugdv_tZ450"
  314. WxMsgTemplateIdActivityChangeApply = "CB7bOl7f3viMG4s1uhRo7WM0Jbx3WvodKuIZ8A_z8fM"
  315. //路演
  316. WxMsgTemplateIdWithRoadshowPending = "1JG9fvKx9o9B-wkZe_gBFQQzMBnp07-hvpZI9QiFcKQ" //路演->研究员收到待处理的申请
  317. WxMsgTemplateIdWithRoadshowDetailResult = "D6AFTJ7CbDDFBYg1R-HRir5bBXkIqGrwUtb2bjN-Wr4" //路演->销售收到处理结果
  318. WxMsgTemplateIdWithRoadshowDeleteNotice = "rciDm9ThigRBGi1SZ4TFd74XA4aoAxSz_ugdv_tZ450" //路演->研究员收到活动删除通知
  319. // 研报小程序
  320. WxMsgTemplateIdWithYbCommunityQuestion = "rciDm9ThigRBGi1SZ4TFd74XA4aoAxSz_ugdv_tZ450" // 研报小程序->问答社区回复通知
  321. WxMsgTemplateIdWithSealApplyFinished = "rciDm9ThigRBGi1SZ4TFd74XA4aoAxSz_ugdv_tZ450" // 用印申请-已签回通知
  322. UserTemplateIdByProduct = "-YjuPOB7Fqd-S3ilabYa6wvjDY9aXmeEfPN6DCiy-EY"
  323. // 买方研选小程序
  324. WxMsgCategoryTemplateIdActivityChangeApply = "M975oDGwJXSX5rv4brhF4mbhl8LLoXcY_HzSKzQOtQs" //买方研选活动变更通知-类目模板ID
  325. WxMsgCategoryTemplateIdActivityCancleApply = "NdnEwNmqTy8LSVGJNGSAEkTdG9U17Vk7dveqwroiTLM" //买方研选活动取消通知-类目模板ID
  326. WxMsgCategoryTemplateIdActivityPublishApply = "wLeV7tVK4ZJBoAvsmfXkHveVW8yefGAkwnVKQWRi8uQ" //买方研选活动报告发布通知-类目模板ID
  327. WxMsgCategoryTemplateIdCompanyApprovalMessageRai = "wU4x_c5XruwuA44VZelyklRNOfq4XrU9ILckTtDs6hg" //权益销售签约成功通知买方研选类目模版消息通知-类目模板ID
  328. WxMsgCategoryTemplateIdActivityApply = "IemWOTzbnLBqJ2ozSiFqm13WjaotoC3V4uXaxTij08I" //后台研选活动给客户报名或取消报名模版消息
  329. }
  330. //查研观向小助手
  331. {
  332. //原有的模板ID
  333. WxPublicIdXzs = "wx9b5d7291e581233a" //查研观向小助手
  334. WxPublicSecretXzs = "f4d52e34021eee262dce9682b31f8861" //查研观向小助手
  335. WxMsgTemplateIdActivityChangeApplyXzs = "CB7bOl7f3viMG4s1uhRo7WM0Jbx3WvodKuIZ8A_z8fM" //查研观向活动变更通知-模板ID(小助手)
  336. TemplateIdByProductXzs = "-YjuPOB7Fqd-S3ilabYa6wvjDY9aXmeEfPN6DCiy-EY" //产品运行报告通知-模板ID(小助手)
  337. WxMsgTemplateIdActivityApplyXzs = "U3su--7d6xsCDcP6Tya0N0wWpKn_uI0zO1cutRK52cc" //查研观向销售帮对应客户报名通知-模板ID
  338. WxMsgTemplateIdCompanyApprovalMessageRai = "RcV2uM5nFSiUtOHsq4SdYz2Fhk-OVfg5rutWz2IsSJQ" //权益销售签约成功通知查研观向小助手模版消息-模板ID
  339. }
  340. }
  341. // 生产环境模板消息
  342. func WxRelease() {
  343. WxAppId = "wx4a844c734d8c8e56"
  344. WxAppSecret = "26c586e7ccb3c575433f0f37797b3eeb"
  345. WxId = "gh_b67e0049fb8c"
  346. //模板消息
  347. {
  348. TemplateIdByProduct = "Cp2wF8gvBtxyWV4DeYuI172oqwyYXVRSm3AyJO42d84"
  349. TemplateIdByCompanyApply = "yqaDUavXAKBpsPqTr0zYXAGIQYeCijZtWwFsT07wTbE"
  350. WxMsgTemplateIdActivityChangeApply = "dYg6iHooRq74PyCXmw_Ns7qdJZmbtLoKS2p2FKeaXl0"
  351. //销售跨部门领取客户通知
  352. TemplateIdByCompanyReceive = "-ccp916f5rjMhwj8CtOAW_d_Os6ran8q5okVCENg924"
  353. //销售"添加客户/领取客户"权限变更通知
  354. TemplateIdByCompanyReceivePermission = "rciDm9ThigRBGi1SZ4TFd74XA4aoAxSz_ugdv_tZ450"
  355. //路演
  356. WxMsgTemplateIdWithRoadshowPending = "1JG9fvKx9o9B-wkZe_gBFQQzMBnp07-hvpZI9QiFcKQ" //路演->研究员收到待处理的申请
  357. WxMsgTemplateIdWithRoadshowDetailResult = "D6AFTJ7CbDDFBYg1R-HRir5bBXkIqGrwUtb2bjN-Wr4" //路演->销售收到处理结果
  358. WxMsgTemplateIdWithRoadshowDeleteNotice = "rciDm9ThigRBGi1SZ4TFd74XA4aoAxSz_ugdv_tZ450" //路演->研究员收到活动删除通知
  359. // 研报小程序
  360. WxMsgTemplateIdWithYbCommunityQuestion = "rciDm9ThigRBGi1SZ4TFd74XA4aoAxSz_ugdv_tZ450" // 研报小程序->问答社区回复通知
  361. WxMsgTemplateIdWithSealApplyFinished = "rciDm9ThigRBGi1SZ4TFd74XA4aoAxSz_ugdv_tZ450" // 用印申请-已签回通知
  362. UserTemplateIdByProduct = "Cp2wF8gvBtxyWV4DeYuI172oqwyYXVRSm3AyJO42d84" //用户产品允许通知模版
  363. // 买方研选小程序
  364. WxMsgCategoryTemplateIdActivityChangeApply = "mpaOZ8xGABHJE40KaK53vzMtn30Pe9nhYK54Vvl6f0E" //买方研选活动变更通知-类目模板ID
  365. WxMsgCategoryTemplateIdActivityCancleApply = "N1oPORd3cHUJKAX6IZysZPQfemXv-ARf8iTYp0w0IvA" //买方研选活动取消通知-类目模板ID
  366. WxMsgCategoryTemplateIdActivityPublishApply = "IBMqiE61lVgUfFM4rsH0XCH57R_G3PbWvRbnzg9JHPI" //买方研选活动报告发布通知-类目模板ID
  367. WxMsgCategoryTemplateIdCompanyApprovalMessageRai = "t1CcxcOkoZkWZrDRs6zYUlceBGYMV3mhkBYUa8a6Mx0" //权益销售签约成功通知买方研选类目模版消息通知-类目模板ID
  368. WxMsgCategoryTemplateIdActivityApply = "HKD03oZfSv8LJgeoHz0pynai3G2Ls4h8zZ6BfOpZmIA" //后台研选活动给客户报名或取消报名模版消息
  369. }
  370. //查研观向小助手
  371. {
  372. //新的模板ID
  373. WxPublicIdXzs = "wxb7cb8a15abad5b8e" //查研观向小助手
  374. WxPublicSecretXzs = "f425ba2863084249722af1e2a5cfffd3" //查研观向小助手
  375. WxMsgTemplateIdActivityChangeApplyXzs = "7qe3i4MrGxAIPhJeMgoqqw6j0A_foUB65DLSmxKe05s" //查研观向活动变更通知-模板ID(小助手)
  376. TemplateIdByProductXzs = "tNcCUiK_uUkuxaFF7M9NP2RwLkw8uHFjG-TDIxGUKxo" //产品运行报告通知-模板ID(小助手)
  377. WxMsgTemplateIdActivityApplyXzs = "mItHdTF6swcunM4P36lOjnLknGbHaLqYdbOsRKscBq4" //查研观向销售帮对应客户报名通知-模板ID
  378. WxMsgTemplateIdCompanyApprovalMessageRai = "JlGx2rKZKIsolvkQ1ZbGSBDNzIIJAaF1bbwcdLuJwQ8" //权益销售签约成功通知查研观向小助手模版消息-模板ID
  379. }
  380. }
  381. // CrmOpenApiConfig 上海crm开放api配置
  382. func CrmOpenApiConfig() {
  383. if RunMode == "release" {
  384. CRM_OPEN_API_URL = "http://crm.hzinsights.com/openapi"
  385. CRM_OPEN_API_APP_KEY = "26945134"
  386. CRM_OPEN_API_APP_SECRET = "b99cb2bdec70d20156000f664ec5ac30"
  387. } else {
  388. CRM_OPEN_API_URL = "http://106.15.192.100:8100/openapi"
  389. CRM_OPEN_API_APP_KEY = "26945134"
  390. CRM_OPEN_API_APP_SECRET = "b99cb2bdec70d20156000f664ec5ac30"
  391. }
  392. }
  393. // initQsOpenApiConfig 全时开放api配置
  394. func initQsOpenApiConfig() {
  395. QsAppID = "ed1cc7c87c97089263fc899fbab193b0"
  396. QsSecretKey = "d92b91265dbbc5e3af44edfb82503635"
  397. if RunMode == "release" {
  398. QsUserId = 22330940
  399. QsUserName = "1406228535@qq.com"
  400. } else {
  401. QsUserId = 19896481
  402. QsUserName = "pyan@hzinsights.com"
  403. }
  404. }
  405. // ComeinOpenApiConfig 进门开放api配置
  406. func ComeinOpenApiConfig() {
  407. if RunMode == "release" {
  408. COMEIN_URL = "https://server.comein.cn/comein/index.php"
  409. COMEIN_APPID = "39b48779-debd-446a-a303-900322d8e356"
  410. COMEIN_SECREKEY = "9102a767f20f11ecb5d6b8599f142ed4"
  411. } else {
  412. COMEIN_URL = "https://testserver.comein.cn/comein/index.php"
  413. COMEIN_APPID = "7b966708-4a8b-4d24-9066-fe29920e7eee"
  414. COMEIN_SECREKEY = "76e004876fae4b3c8721a3f4c2d115da"
  415. }
  416. }
  417. // YiDongApiConfig 易董开放api配置
  418. func YiDongApiConfig() {
  419. if RunMode == "release" {
  420. YiDongHuaWeiYunUrl = "https://achievement.valueonline.cn/"
  421. YiDongZhengTongYunUrl = "https://services.valueonline.cn/"
  422. YiDongZhengTongYunClientId = "ca86a257ebb46fce"
  423. YiDongZhengTongYunClientSecret = "338db2b2ca86a257ebb46fced9003f53"
  424. } else {
  425. YiDongHuaWeiYunUrl = "https://achievement-test.valueonline.cn/"
  426. YiDongZhengTongYunUrl = "https://services-dev.valueonline.cn/"
  427. YiDongZhengTongYunClientId = "d9bfb79627ac30d0"
  428. YiDongZhengTongYunClientSecret = "96a61dd2d9bfb79627ac30d02188bbe2"
  429. }
  430. }
  431. // initSystemServer 内部服务配置
  432. func initSystemServer() {
  433. if RunMode == "release" {
  434. // ppt 转图片服务地址
  435. Ppt2ImageUrl = "http://172.19.173.232:8086/v1/image/ppt2img"
  436. } else {
  437. // ppt 转图片服务地址
  438. Ppt2ImageUrl = "http://127.0.0.1:8086/v1/image/ppt2img"
  439. }
  440. }
  441. // WxPayConfig 微信商户内部配置
  442. func WxPayConfig() {
  443. if RunMode == "release" {
  444. Wx_MFYX_Refund_NotifyUrl = "https://mfyx.hzinsights.com/api/wechat/wxpay/refunds/notify/" //买方研选微信商户退款回调地址
  445. } else {
  446. Wx_MFYX_Refund_NotifyUrl = "https://testmfyx.hzinsights.com/api/wechat/wxpay/refunds/notify" //买方研选微信商户退款回调地址
  447. }
  448. }
  449. //http://adminapi.brilliantstart.cn/admin/
  450. //http://adminapi.brilliantstart.cn/swagger/
  451. //http://8.136.199.33:8602/swagger/