实现个人客户微信认证和短信验证功能
- 添加个人客户微信登录和手机验证码登录接口 - 实现个人客户设备、ICCID、手机号关联管理 - 添加短信发送服务(HTTP 客户端) - 添加微信认证服务(含 mock 实现) - 添加 JWT Token 生成和验证工具 - 创建数据库迁移脚本(personal_customer 关联表) - 修复测试文件中的路由注册参数错误 - 重构 scripts 目录结构(分离独立脚本到子目录) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -39,3 +39,17 @@ func RedisAccountSubordinatesKey(accountID uint) string {
|
||||
func RedisShopSubordinatesKey(shopID uint) string {
|
||||
return fmt.Sprintf("shop:subordinates:%d", shopID)
|
||||
}
|
||||
|
||||
// RedisVerificationCodeKey 生成验证码的 Redis 键
|
||||
// 用途:存储手机验证码
|
||||
// 过期时间:5 分钟
|
||||
func RedisVerificationCodeKey(phone string) string {
|
||||
return fmt.Sprintf("verification:code:%s", phone)
|
||||
}
|
||||
|
||||
// RedisVerificationCodeLimitKey 生成验证码发送频率限制的 Redis 键
|
||||
// 用途:限制验证码发送频率
|
||||
// 过期时间:60 秒
|
||||
func RedisVerificationCodeLimitKey(phone string) string {
|
||||
return fmt.Sprintf("verification:limit:%s", phone)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user