constants.go 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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. FormatDateUnSpace = "20060102" //日期格式
  10. FormatDateTime = "2006-01-02 15:04:05" //完整时间格式
  11. HlbFormatDateTime = "2006-01-02_15:04:05.999" //完整时间格式
  12. FormatDateTimeUnSpace = "20060102150405" //完整时间格式
  13. PageSize15 = 15 //列表页每页数据量
  14. PageSize5 = 5
  15. PageSize10 = 10
  16. PageSize20 = 20
  17. PageSize30 = 30
  18. )
  19. const (
  20. APPNAME = "弘则-task"
  21. EmailSendToUsers = "317699326@qq.com;984198890@qq.com;512188925@qq.com"
  22. //RefreshEdbInfoEmailSendToUsers = "317699326@qq.com;984198890@qq.com;jhwang@hzinsights.com;lnyan@hzinsights.com;vwang@hzinsights.com"
  23. RefreshEdbInfoEmailSendToUsers = "317699326@qq.com;984198890@qq.com;jhwang@hzinsights.com;lnyan@hzinsights.com"
  24. )
  25. //手机号,电子邮箱正则
  26. const (
  27. 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}$" //手机号码
  28. RegularEmail = `\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*` //匹配电子邮箱
  29. )
  30. //验证码code
  31. const (
  32. REGISTER_CODE = iota + 1 //注册
  33. LOGIN_CODE //登录
  34. )
  35. //聚合短信
  36. var (
  37. TplId = "65692"
  38. JhAppKey = "4c8504c49dd335e99cfd7b6a3a9e2415"
  39. )
  40. //科大讯飞--语音合成
  41. const (
  42. XfSTATUS_FIRST_FRAME = 0 //第一帧标识
  43. XfSTATUS_CONTINUE_FRAME = 1 //中间帧标识
  44. XfSTATUS_LAST_FRAME = 2 //最后一帧标识
  45. XfAPPID = "5ed70e9d"
  46. XfAPIKey = "d580509ca262e9586fb65a7064d5ce77"
  47. XfAPISecret = "a085720dc55850c720fa5576335f847a"
  48. XfHostUrl = "wss://tts-api.xfyun.cn/v2/tts"
  49. XfOrigin = "http://tts-api.xfyun.cn/"
  50. XfHost = "tts-api.xfyun.cn"
  51. )
  52. const (
  53. EmailSendToHzUsers = "544935339@qq.com;lnyan@hzinsights.com;pdzhao@hzinsights.com;glji@hzinsights.com;tshen@hzinsights.com"
  54. //EmailSendToHzUsers = "317699326@qq.com"
  55. )
  56. //数据来源渠道
  57. const (
  58. DATA_SOURCE_THS = iota + 1 //同花顺
  59. DATA_SOURCE_WIND //wind
  60. DATA_SOURCE_PB //彭博
  61. DATA_SOURCE_CALCULATE //计算指标
  62. DATA_SOURCE_CALCULATE_LJZZY //累计值转月
  63. DATA_SOURCE_CALCULATE_TBZ //同比值
  64. DATA_SOURCE_CALCULATE_TCZ //同差值
  65. DATA_SOURCE_CALCULATE_NSZYDPJJS //N数值移动平均计算
  66. DATA_SOURCE_MANUAL //手工指标
  67. DATA_SOURCE_LZ //隆众
  68. DATA_SOURCE_YS //有色
  69. DATA_SOURCE_CALCULATE_HBZ //环比值->12
  70. DATA_SOURCE_CALCULATE_HCZ //环差值->13
  71. DATA_SOURCE_CALCULATE_BP //变频->14
  72. DATA_SOURCE_GL //钢联->15
  73. DATA_SOURCE_ZZ //郑商所->16
  74. DATA_SOURCE_DL //大商所->17
  75. DATA_SOURCE_SH //上期所->18
  76. DATA_SOURCE_CFFEX //中金所->19
  77. DATA_SOURCE_SHFE //上期能源->20
  78. DATA_SOURCE_GIE //欧洲天然气->21
  79. DATA_SOURCE_CALCULATE_TIME_SHIFT //时间移位->22
  80. DATA_SOURCE_CALCULATE_ZJPJ //直接拼接->23
  81. DATA_SOURCE_CALCULATE_LJZTBPJ //累计值同比拼接->24
  82. DATA_SOURCE_LT //路透->25
  83. DATA_SOURCE_COAL //煤炭网->26
  84. DATA_SOURCE_PYTHON //python代码->27
  85. DATA_SOURCE_PB_FINANCE //彭博财务数据->28
  86. DATA_SOURCE_GOOGLE_TRAVEL //谷歌出行->29
  87. DATA_SOURCE_PREDICT //普通预测指标->30
  88. DATA_SOURCE_PREDICT_CALCULATE //预测指标运算->31
  89. DATA_SOURCE_PREDICT_CALCULATE_TBZ //预测指标同比值->32
  90. DATA_SOURCE_PREDICT_CALCULATE_TCZ //预测指标同差值->33
  91. DATA_SOURCE_MYSTEEL_CHEMICAL //钢联化工->34
  92. DATA_SOURCE_CALCULATE_CJJX //超季节性->35
  93. DATA_SOURCE_EIA_STEO //eia steo报告->36
  94. DATA_SOURCE_CALCULATE_NHCC //计算指标(拟合残差)->37
  95. DATA_SOURCE_COM_TRADE //联合国商品贸易数据->38
  96. DATA_SOURCE_PREDICT_CALCULATE_NSZYDPJJS //预测指标 - N数值移动平均计算 -> 39
  97. DATA_SOURCE_CALCULATE_ADJUST //数据调整->40
  98. DATA_SOURCE_SCI //卓创数据(红桃三)->41
  99. DATA_SOURCE_PREDICT_CALCULATE_LJZZY //预测指标 - 累计值转月->42
  100. DATA_SOURCE_PREDICT_CALCULATE_HBZ //预测指标 - 环比值->43
  101. DATA_SOURCE_PREDICT_CALCULATE_HCZ //预测指标 - 环差值->44
  102. DATA_SOURCE_PREDICT_CALCULATE_BP //预测指标 - 变频->45
  103. DATA_SOURCE_PREDICT_CALCULATE_TIME_SHIFT //预测指标 - 时间移位->46
  104. DATA_SOURCE_PREDICT_CALCULATE_ZJPJ //预测指标 - 直接拼接->47
  105. DATA_SOURCE_PREDICT_CALCULATE_LJZTBPJ //预测指标 - 累计值同比拼接->48
  106. DATA_SOURCE_PREDICT_CALCULATE_CJJX //预测指标 - 超季节性->49
  107. DATA_SOURCE_PREDICT_CALCULATE_NHCC //预测指标 - 计算指标(拟合残差)->50
  108. DATA_SOURCE_CALCULATE_JP //变频->51
  109. )
  110. //http://datawind.hzinsights.com:8040/hz_server
  111. const (
  112. Hz_Data_Url = "http://datawind.hzinsights.com:8040/" //同花顺,万得接口服务地址
  113. Hz_Data_PB_Url = "http://datapb.hzinsights.com:8040/" //彭博接口地址
  114. Hz_Data_LT_Url = "http://dataek.hzinsights.com:8040/" //路透社接口地址
  115. )
  116. var Hz_Data_WIND_Url_List = []string{"http://datawind.hzinsights.com:8040/", "http://datawind2.hzinsights.com:8040/"}
  117. //var Hz_Data_WIND_Url_List = []string{"http://datawind2.hzinsights.com:8040/", "http://datawind3.hzinsights.com:8040/"}
  118. //数据刷新频率
  119. const (
  120. DATA_REFRESH = 7 //7个单位,日/周/月/季度/年
  121. DATA_END_DATE_LIMIT = 4 //数据结束日期为,当前日期,加上4年时间
  122. )
  123. var (
  124. Hz_Server_Data_Url string //同花顺,万得接口服务地址(阿里云windows服务器地址)
  125. )
  126. //EDB_LIB
  127. var (
  128. APP_EDB_LIB_NAME_EN = "hongze_edb_lib"
  129. EDB_LIB_Md5_KEY = "GuRaB6dY1bXOJcwG"
  130. )
  131. // 研报类型标识
  132. var (
  133. REPORT_TYPE_DAY = "day"
  134. REPORT_TYPE_WEEK = "week"
  135. REPORT_TYPE_TWO_WEEK = "two_week"
  136. REPORT_TYPE_MONTH = "month"
  137. REPORT_TYPE_OTHER = "other"
  138. )
  139. const (
  140. SendTemplateMsgAuthorization = "dc855fce962a639faa779cbdd4cd332f"
  141. )
  142. //模板消息推送类型
  143. const (
  144. TEMPLATE_MSG_YB_VOICE_BROADCAST = 20 //研报语音播报
  145. )