add: user accomplished

This commit is contained in:
wwweww
2026-02-27 05:42:13 +08:00
parent 659168fe32
commit a0c720eb2f
90 changed files with 9592 additions and 1180 deletions
@@ -7,6 +7,7 @@ import (
"context"
"encoding/json"
"fmt"
"juwan-backend/common/redisx"
"time"
"juwan-backend/app/email/api/internal/svc"
@@ -44,7 +45,7 @@ func (l *SendVerificationCodeLogic) SendVerificationCode(req *types.SendVerifica
code := utils.GenCode()
requestID := uuid.NewString()
redisKey := fmt.Sprintf("vcode:%s:%s:%s", requestID, req.Scene, req.Email)
redisKey := fmt.Sprintf(redisx.VCODE_KEY_PREFIX, requestID, req.Scene, req.Email)
if exists, getErr := l.svcCtx.RedisCluster.Get(l.ctx, redisKey).Result(); getErr == nil && exists != "" {
return nil, fmt.Errorf("verification code already sent, please wait before requesting a new one")
}