Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ActionTypeEditPhone 修改手机号 ActionTypeEditPhone = "EDIT_PHONE" // ActionTypeWithdraw 提现 ActionTypeWithdraw = "WITHDRAW" // ActionTypeLogin 登录 ActionTypeLogin = "LOGIN" // ActionTypeMergeAccount 合并账号 ActionTypeMergeAccount = "MERGE_ACCOUNT" // ActionTypeRegister 注册 ActionTypeRegister = "REGISTER" // ActionTypeBalanceChange 余额变更 ActionTypeBalanceChange = "BALANCE_CHANGE" // ActionTypeSmsLog 短信日志 ActionTypeSmsLog = "SMS_LOG" )
定义常量来表示 StatusCodes 的键
View Source
const ( // StatusNormal 正常 StatusNormal = 0 // 0 正常 // StatusClosed 关闭 StatusClosed = 1 // 1 关闭 // StatusExpired 到期 StatusExpired = 2 // 2 到期 // StatusMaintenance 维护 StatusMaintenance = 3 // 3 维护 // StatusInClearance 清运中 StatusInClearance = 4 // 4 清运中 // StatusOffline 下线(争议) StatusOffline = 5 // 5 下线(争议) )
状态常量
View Source
const ( StatusWait = "wait" // 等待清运 StatusIssued = "issued" // 已发放 StatusCheck = "check" // 系统核查中 )
View Source
const ( // SmsTypeRegister 注册短信 SmsTypeRegister = "REGISTER_SMS" // SmsTypeChangePhone 修改手机号短信 SmsTypeChangePhone = "CHANGE_PHONE_SMS" // SmsTypeMergeAccount 账号合并短信 SmsTypeMergeAccount = "MERGE_ACCOUNT_SMS" )
发送短信类型
View Source
const ( // UserTypeInitialAdmin 初始管理员 UserTypeInitialAdmin = "IA" // 初始管理员 // UserTypeAdmin 管理员 UserTypeAdmin = "AD" // 管理员 // UserTypeDeliverer 投递用户 UserTypeDeliverer = "UD" // 投递用户 // UserTypeClearWorker 清运员 UserTypeClearWorker = "CW" // 清运员 )
View Source
const SmsCodeCacheKey = "SMS_CODE_CACHE:"
SmsCodeCacheKey 定义短信验证码缓存键
Variables ¶
View Source
var ActionTypeCodes = map[string]ActionTypeMessage{
"EDIT_PHONE": {
Des: "用户ID %d 修改手机号,原手机号 %s,修改为 %s",
Message: "修改手机号",
},
"WITHDRAW": {
Des: "用户ID %d 发起了提现请求,提现金额为 %s",
Message: "用户提现",
},
"LOGIN": {
Des: "用户ID %d 成功登录,登录时间为 %s",
Message: "用户登录",
},
"MERGE_ACCOUNT": {
Des: "用户ID %d 发起合并账户,被合并账户ID %d,合并后账户ID %d",
Message: "用户合并账户",
},
"REGISTER": {
Des: "用户ID %d 完成了注册,注册时使用的手机号是 %s",
Message: "用户注册",
},
"BALANCE_CHANGE": {
Des: "用户ID %d 原余额:%.2f,变更金额是: %.2f, 变更后余额:%.2f",
Message: "用户余额变更",
},
"SMS_LOG": {
Des: "用户ID %d 短信内容: %s",
Message: "短信日志",
},
}
ActionTypeCodes 定义状态和提示信息
View Source
var SmsTypeSlice = []string{ SmsTypeRegister, SmsTypeChangePhone, SmsTypeMergeAccount, }
SmsTypeSlice 定义 SmsTypeSlice 包含所有预定义的短信类型
Functions ¶
func CheckSmsTypeNo ¶ added in v0.0.19
CheckSmsTypeNo 检查传入的短信类型是否在预定义的 SmsType 常量中
Types ¶
type ActionTypeMessage ¶ added in v0.0.17
ActionTypeMessage 操作动作类型信息
Source Files ¶
Click to show internal directories.
Click to hide internal directories.