package utils import "io/fs" const ( UserLoginSalt = "MiQM9YUdf89T2uIH" // 用户登录盐值 DesKeySalt = "MxuqSoUrTAmyRd9fb0TtlrPk" // DesKey盐值 ) const ( CACHE_ACCESS_TOKEN_LOGIN = "pc_eta_min_crm_ht:login:" //管理后台登录 CACHE_ACCESS_TOKEN_LOGIN_NO_TRUST = "pc_eta_min_crm:login_ht:no_trust:" //管理后台登录(不可信登录态) ) // 手机号,电子邮箱正则 const ( 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}$" //手机号码 RegularEmail = `\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*` //匹配电子邮箱 ) // 常量定义 const ( FormatTime = "15:04:05" //时间格式 FormatTimeHm = "15:04" //时间格式 FormatDate = "2006-01-02" //日期格式 FormatDateUnSpace = "20060102" //日期格式 FormatDateTime = "2006-01-02 15:04:05" //完整时间格式 HlbFormatDateTime = "2006-01-02_15:04:05.999" //完整时间格式 FormatDateTimeUnSpace = "20060102150405" //完整时间格式 FormatShortDateTimeUnSpace = "060102150405" //省去开头两位年份的时间格式 EmptyDateTimeStr = "0000-00-00 00:00:00" //DateTime零值字符串 EmptyDateStr = "0000-00-00" //Date零值字符串 FormatMonthDayUnSpace = "0102" //日期格式 FormatMonthDay = "01-02" //日期格式 FormatYearMonthDate = "2006-01" //日期格式 FormatYearDate = "2006" //日期格式 PageSize15 = 15 //列表页每页数据量 PageSize5 = 5 PageSize10 = 10 PageSize20 = 20 PageSize30 = 30 PageSize50 = 50 PageSize100 = 100 MaxDepartmentLevel = 3 ) // DIR_MOD 目录创建权限 const DIR_MOD fs.FileMode = 0766 // Unix permission bits // 用户状态定义 const ( UserStatusNo = 0 //禁用 UserStatusPotential = 1 //潜在用户 UserStatusFormal = 2 //正式用户 ) // Pdf研报状态定义 const ( ReportStatusUp = 1 // 研报已发布 ReportStatusDown = 2 // 研报未发布 ) const ( STORAGESOURCE_OSS_NAME = "oss" STORAGESOURCE_MINIO_NAME = "minio" ) // 免验证接口 var NoAuthApiMap = map[string]bool{ "/role/menu/buttons": true, "/role/menu/list": true, "/department/list": true, "/sys_user/reset_my_pass": true, "/chart_permission/list": true, "/user/change_list": true, "/classify/list": true, "/seller/list": true, "/user/readMessage": true, "/user/readMessages": true, "/user/message": true, "/sys/config": true, } var APPNAME string = "海通CRM"