constants.go 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. package utils
  2. const (
  3. Md5Key = ""
  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. FormatDateTimeUnSpace = "20060102150405" //完整时间格式
  12. FormatMonthDate = "0102" //月日格式
  13. PageSize15 = 15 //列表页每页数据量
  14. PageSize5 = 5
  15. PageSize10 = 10
  16. PageSize20 = 20
  17. PageSize30 = 30
  18. PageMaxSize = 100 //每页最大数据数
  19. )
  20. const (
  21. APPNAME = "弘则开放API"
  22. EmailSendToUsers = "glji@hzinsights.com;pyan@hzinsights.com;cxzhang@hzinsights.com"
  23. )
  24. // 手机号,电子邮箱正则
  25. const (
  26. 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}$" //手机号码
  27. RegularEmail = `\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*` //匹配电子邮箱
  28. )
  29. // 客户状态
  30. const (
  31. COMPANY_STATUS_TRY_OUT = "试用"
  32. COMPANY_STATUS_FOREVER = "永续"
  33. COMPANY_STATUS_FREEZE = "冻结"
  34. COMPANY_STATUS_LOSE = "流失"
  35. COMPANY_STATUS_FORMAL = "正式"
  36. COMPANY_STATUS_POTENTIAL = "潜在"
  37. COMPANY_STATUS_TRY_OUT_COUNT = 30
  38. COMPANY_APPROVE_STATUS = "待审批"
  39. )
  40. // 管理员,ficc管理员,ficc销售,权益管理员,权益销售。
  41. // 角色类型/类型编码
  42. const (
  43. ROLE_TYPE_ADMIN = "管理员"
  44. ROLE_TYPE_FICC_ADMIN = "ficc管理员"
  45. ROLE_TYPE_FICC_SELLER = "ficc销售"
  46. ROLE_TYPE_RAI_ADMIN = "权益管理员"
  47. ROLE_TYPE_RAI_SELLER = "权益销售"
  48. ROLE_TYPE_FICC_GROUP = "ficc组长"
  49. ROLE_TYPE_RAI_GROUP = "权益组长"
  50. ROLE_TYPE_FICC_DEPARTMENT = "ficc部门经理"
  51. ROLE_TYPE_RAI_DEPARTMENT = "权益部门经理"
  52. ROLE_TYPE_FICC_RESEARCHR = "ficc研究员"
  53. ROLE_TYPE_RAI_RESEARCHR = "权益研究员"
  54. ROLE_TYPE_CODE_ADMIN = "admin" //管理员
  55. ROLE_TYPE_CODE_FICC_ADMIN = "ficc_admin" //ficc管理员
  56. ROLE_TYPE_CODE_FICC_SELLER = "ficc_seller" //ficc销售
  57. ROLE_TYPE_CODE_RAI_ADMIN = "rai_admin" //权益管理员
  58. ROLE_TYPE_CODE_RAI_SELLER = "rai_seller" //权益销售
  59. ROLE_TYPE_CODE_FICC_GROUP = "ficc_group" //ficc组长
  60. ROLE_TYPE_CODE_RAI_GROUP = "rai_group" //ficc组长
  61. ROLE_TYPE_CODE_FICC_DEPARTMENT = "ficc_department" //ficc部门经理
  62. ROLE_TYPE_CODE_RAI_DEPARTMENT = "rai_department" //权益部门经理
  63. ROLE_TYPE_CODE_FICC_RESEARCHR = "ficc_researcher" //ficc研究员
  64. ROLE_TYPE_CODE_RAI_RESEARCHR = "rai_researcher" //权益研究员
  65. ROLE_TYPE_CODE_COMPLIANCE = "compliance" //合规角色
  66. ROLE_TYPE_SELLERS = "'ficc_admin','ficc_seller','rai_admin','rai_seller','ficc_group','rai_group','ficc_department','rai_department','compliance'"
  67. )
  68. // 客户类型
  69. const (
  70. COMPANY_CLASSIFY_FICC = "ficc"
  71. COMPANY_CLASSIFY_RAI = "权益"
  72. COMPANY_CLASSIFY_PARTNER = "合作伙伴"
  73. )
  74. const (
  75. COMPANY_PRODUCT_FICC_ID = 1
  76. COMPANY_PRODUCT_FICC_NAME = "ficc"
  77. COMPANY_PRODUCT_RAI_ID = 2
  78. COMPANY_PRODUCT_RAI_NAME = "权益"
  79. )
  80. var PermissionFiccClassifyArr = [...]string{"宏观经济", "化工产业", "黑色产业", "有色产业"}
  81. var PermissionAllClassifyArr = [...]string{"宏观经济", "化工产业", "黑色产业", "有色产业", "权益"}
  82. const (
  83. key = "zDeESsxsXuionhqSLZYHWcDJ" //全局加密KEY
  84. REPORT_KEY = "Zdhuef3ajCLTpfGLn10cOJLJ" //报告加密Key
  85. )
  86. // 缓存key
  87. const (
  88. CACHE_KEY_ADMIN = "calendar:admin:list" //系统用户列表缓存key
  89. CACHE_KEY_DAYNEW_REFRESH = "admin:day_new:refresh" //每日资讯拉取企业微信聊天记录
  90. CACHE_KEY_DAYNEW_TRANSLATE = "admin:day_new:translate" //每日资讯中翻英
  91. )
  92. // 查研缓存key
  93. const (
  94. CYGX_ARTICLE_UPDATE_KEY = "CYGX_ARTICLE_UPDATE_KEY" //策略平台更新文章key
  95. )
  96. const ALIYUN_YBIMG_HOST = "https://hzstatic.hzinsights.com/static/yb_wx/"
  97. const HZ_DEFAULT_AVATAR = "https://hzstatic.hzinsights.com/static/yb_wx/hz_default_avatar.png"
  98. const HZPHONE = "057187186319" //弘则电话
  99. const (
  100. CLPT_APPID = "XVuGlcyEEVNYVWx5" //策略平台APPID
  101. CLPT_CRM_URL = "https://crm.hzinsights.com/" //策略平台老的CRM接口访问地址
  102. )
  103. // EDB_LIB
  104. var (
  105. APP_EDB_LIB_NAME_EN = "hongze_edb_lib"
  106. EDB_LIB_Md5_KEY = "GuRaB6dY1bXOJcwG"
  107. )