config.go 23 KB

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