config.go 23 KB

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