constants.go 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. package utils
  2. const (
  3. Md5Key = "Ks@h64WJ#tcVgG8$&WlNfqvLAtMgpxWN"
  4. )
  5. // 常量定义
  6. const (
  7. FormatTime = "15:04:05" //时间格式
  8. FormatDate = "2006-01-02" //日期格式
  9. FormatDateTime = "2006-01-02 15:04:05" //完整时间格式
  10. HlbFormatDateTime = "2006-01-02_15:04:05.999" //完整时间格式
  11. FormatDateTimeNoSecond = "2006-01-02 15:04" //完整时间格式
  12. FormatDateTimeUnSpace = "20060102150405" //完整时间格式
  13. FormatYearDate = "2006" //日期格式
  14. PageSize15 = 15 //列表页每页数据量
  15. PageSize5 = 5
  16. PageSize10 = 10
  17. PageSize20 = 20
  18. PageSize30 = 30
  19. )
  20. const (
  21. APPNAME = "弘则-策略平台网页版"
  22. EmailSendToUsers = "cxzhang@hzinsights.com"
  23. ApiAuthorization = "bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkiLCJwaG9uZV9udW1iZXIiOiIxMjM0NTY3ODkiLCJuYW1lIjoi5YW25LuWIiwiZW50cmFuY2UiOiJwYXNzd3dvcmQiLCJpYXQiOjE2MzQ4NzA1OTQsImV4cCI6MTYzNDg3NDE5NH0.tho2L9jsbDPn8ltEGUVDve_nHsh0Kzf6ZrSz0RcZ0ag"
  24. ApiUrl = "https://vmp.hzinsights.com/v2api/"
  25. CHART_INFO_HTTP_URL = "https://vmp.hzinsights.com/v2/charts/"
  26. DISCLAIMERS = "本文为用户投稿,用户在平台中发表的所有资料、言论等仅代表个人观点,与本平台立场无关,不对您构成任何投资建议。本平台对文中陈述、观点判断保持中立,不对所包含内容及数据的真实性、准确性、可靠性或完整性提供任何明示或暗示的保证。请读者仅作参考,并请自行承担全部责任。"
  27. REGISTER_PLATFORM = 2 // 来源 1小程序,2:网页
  28. )
  29. // 手机号,电子邮箱正则
  30. const (
  31. RegularMobile = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0-9])|(17[0-9])|(16[0-9])|(19[0-9]))\\d{8}$" //手机号码
  32. RegularFixedTelephone = "^(\\(\\d{3,4}\\)|\\d{3,4}-|\\s)?\\d{7,14}$" //手机号码
  33. RegularEmail = `\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*` //匹配电子邮箱
  34. )
  35. // 聚合短信
  36. var (
  37. JhGnTplId = "65692" //聚合国内模板编码
  38. JhGjTplId = "10054" //聚合国内模板编码
  39. JhGnAppKey = "4c8504c49dd335e99cfd7b6a3a9e2415" //聚合国内AppKey
  40. JhGjAppKey = "3326ad2c1047a4cd92ace153e6044ca3"
  41. )
  42. // OSS
  43. var (
  44. Endpoint string = "oss-cn-shanghai.aliyuncs.com"
  45. Bucketname string = "hongze"
  46. Imghost string = "https://hongze.oss-cn-shanghai.aliyuncs.com/"
  47. Upload_dir string = "static/images/"
  48. Upload_Audio_Dir string = "static/audio/"
  49. Upload_Pdf_Dir string = "static/pdf/"
  50. AccessKeyId string = "LTAIFMZYQhS2BTvW"
  51. AccessKeySecret string = "12kk1ptCHoGWedhBnKRVW5hRJzq9Fq"
  52. )
  53. // 缓存key
  54. const (
  55. CACHE_KEY_USER_VIEW = "user_view_record" //用户阅读数据
  56. CACHE_KEY_ARTICLE_ID_TEMPLATE = "ce_lue_article_id_template" //策略平台同步过来的文章ID,做微信模板消息推送,同一篇报告12小时只推送一次
  57. )
  58. const (
  59. CE_LUE_NAME string = "策略"
  60. CE_LUE_ID int = 23
  61. CHART_PERMISSION_NAME_YANXUAN string = "研选"
  62. CHART_PERMISSION_NAME_MF_YANXUAN string = "买方研选"
  63. CHART_PERMISSION_ID_YANXUAN int = 31
  64. YI_YAO_NAME string = "医药"
  65. YI_YAO_OTHER_IMG string = "https://hzstatic.hzinsights.com/static/temp/20221118202211/20221118/qzPm61bVf40Je7c5iL1s4CbrDcpv.png" //医药其它图片
  66. YI_YAO_ID int = 22
  67. XIAO_FEI_NAME string = "消费"
  68. XIAO_FEI_OTHER_IMG string = "https://hzstatic.hzinsights.com/static/temp/20221118202211/20221118/BxOfzECjhqjipJCWwAa9Ep99OTMA.png" //消费其它图片
  69. XIAO_FEI_ID int = 21
  70. KE_JI_NAME string = "科技"
  71. KE_JI_OTHER_IMG string = "https://hzstatic.hzinsights.com/static/temp/20221118202211/20221118/vr7eTXIrl6YjJ80DDTVbdnFRQ9mJ.png" //科技其它图片
  72. KE_JI_ID int = 20
  73. ZHI_ZAO_NAME string = "智造"
  74. ZHI_ZAO_OTHER_IMG string = "https://hzstatic.hzinsights.com/static/temp/20221118202211/20221118/SSaQcWzMk5slN3FkCwZifK3qcAWd.png" //智造其它图片
  75. ZHI_ZAO_ID int = 19
  76. SummaryArticleId int = 1000000
  77. StrategyPlatform string = "https://vmp.hzinsights.com/v2/articles/"
  78. DefaultHeadimgurl string = "https://hzstatic.hzinsights.com/static/temp/20220426202204/20220426/P5qLR2zzfBdKItp3eX2Du1tvq9Ba.jpg"
  79. OPEN_TOKEN_KEY string = "CLPT_OPEN_TOKEN_KEY" //策略品台开放平台的token key
  80. OnlineTime string = "2021-06-01 00:00:01" //上线时间
  81. HONG_GUAN_ID int = 1
  82. HZ_COMPANY_ID int = 16
  83. YAN_XUAN_ARTICLE_TYPE_IDS string = "1,2,12" // 属于研选的报告类型ID
  84. REOURCE_YX string = "Yx"
  85. REOURCE_HZ string = "Hz"
  86. GU_SHOU_NAME string = "固收"
  87. GU_SHOU_ID int = 100000 // 自定义权限类型ID ,十万起步
  88. CYGX_TACTICS_TIME_LINE_STATUS string = "cygx_tactics_time_line_status" // 策略时间线是否对外开放
  89. TIME_LINE_ID int = 99999 // 策略时间线的值
  90. TIME_LINE_NAME string = "时间线" // 策略时间线的名称
  91. HONG_GUAN_NAME string = "宏观"
  92. )
  93. // 模板消息推送类型
  94. const (
  95. TEMPLATE_MSG_CYGX_ACTIVITY_ADD = 12 //查研观向小程序活动更新推送 12
  96. TEMPLATE_MSG_CYGX_ARTICLE_ADD = 13 //查研观向报告更新推送 13
  97. TEMPLATE_MSG_CYGX_APPLY = 14 //查研观向审批通知
  98. TEMPLATE_MSG_CYGX_COMMENT = 15 //查研观向留言通知
  99. )
  100. const (
  101. COMPANY_PRODUCT_FICC_ID = 1
  102. COMPANY_PRODUCT_FICC_NAME = "ficc"
  103. COMPANY_PRODUCT_RAI_ID = 2
  104. COMPANY_PRODUCT_RAI_NAME = "权益"
  105. )
  106. const (
  107. TIME_CATEGORYID = 99999 //时间线的分类ID
  108. )
  109. // 活动相关
  110. const (
  111. C_CLASS_ACTIVITY_TYPE_ID int = 7 //C类电话会会议ID
  112. ANALYST_TELL_ACTIVITY_TYPE_ID int = 2 //分析师电话会ID
  113. )
  114. const (
  115. YI_YAO_QI_TA = "https://hzstatic.hzinsights.com/static/temp/20220922202209/20220922/2OQMBFplQE1R3bX1y3obX7JSwSuA.png"
  116. YAN_XUAN_IMG = "https://hzstatic.hzinsights.com/static/temp/20221027202210/20221027/Dd8TrsMh8tNx2tGd5VeaQDyJVQfV.png"
  117. )
  118. var YAN_XUAN_ARTICLE_TYPE_ID = []int{1, 2, 12}
  119. const (
  120. YAN_XUAN_TAB_KEY = "yanxuan_header_tab"
  121. )
  122. const (
  123. YD_TOKEN = "yidong_token"
  124. )
  125. const (
  126. //专项调研背景图片
  127. //ACTIVITY_ZXDY_ImgUrl1 = "https://hzstatic.hzinsights.com/static/temp/20220427202204/20220427/b2Bj3fGakP16iJRFKisQohCWnCNl.png"
  128. //ACTIVITY_ZXDY_ImgUrl2 = "https://hzstatic.hzinsights.com/static/temp/20220427202204/20220427/OkunjfKEgo5KRLifzwwLX8cDZnnN.png"
  129. //ACTIVITY_ZXDY_ImgUrl3 = "https://hzstatic.hzinsights.com/static/temp/20220426202204/20220426/XDLLsjC9XAAy8LIzQr7GsjrBbtX6.png"
  130. ACTIVITY_ZXDY_ImgUrl1 = "https://hzstatic.hzinsights.com/static/temp/20220707202207/20220707/0H4md6VgZMuIttggMUnJxgrlayxC.png"
  131. ACTIVITY_ZXDY_ImgUrl2 = "https://hzstatic.hzinsights.com/static/temp/20220707202207/20220707/rFwAM1c4fIMJM0EGoUkUYl25XH9L.png"
  132. ACTIVITY_ZXDY_ImgUrl3 = "https://hzstatic.hzinsights.com/cygx/special_list_bg.png"
  133. )
  134. // 模板消息地址路由
  135. const (
  136. ACtIVITY_SPECIAL_EXPLAIN = "此类调研具体行程尚未确定,待预报名人数满10人后弘则会确定行程并推送给您活动日期,只有在确定行程中再次报名才完成占位。" //专项调研说明
  137. ACtIVITY_SPECIAL_TRIP_EXPLAIN = "此类调研时间安排已经确定,点击报名后按人次扣除对应机构的服务点数。由于每场活动人数有限,如果不能参加请提前48小时取消,未及时取消导致影响其他客户报名将会维持扣点。" //专项调研说明
  138. )
  139. // 模板消息地址路由
  140. const (
  141. WX_MSG_PATH_ARTICLE_DETAIL = "pageMy/reportDetail/reportDetail?id=" //文章详情模板消息地址
  142. WX_MSG_PATH_ACTIVITY_SPECIAL_DETAIL = "activityPages/specialDetail/specialDetail?id=" //专项调研活动模板消息地址
  143. WX_MSG_PATH_ACTIVITY_INDUSTRYR_EPORT = "reportPages/IndustryReport/IndustryReport?id=" //产业文章列表模板消息地址
  144. WX_MSG_PATH_ACTIVITY_DETAIL = "activityPages/activityDetail/activityDetail?id=" //活动模板消息地址
  145. )
  146. // 微信模板消息推送公共接口的秘钥
  147. const (
  148. SendTemplateMsgAuthorization = "dc855fce962a639faa779cbdd4cd332f"
  149. )
  150. // 时间线路由
  151. const (
  152. TIME_LINE_ROUTE = "/api/report/industry/ArticleList?PageSize=10&CurrentIndex=1&CategoryId=99999&IndustrialManagementId="
  153. )