fix(auth): 修复邮件验证码逻辑,支持多种场景验证
Build docker and publish / build (20.15.1) (push) Successful in 4m42s

修改邮件验证码校验逻辑,使其能够处理注册和安全验证等多种场景。移除不再需要的用户绑定检查,简化代码逻辑。
This commit is contained in:
2025-12-31 02:09:31 -08:00
parent 4ffccd5ad8
commit 5598181a48
2 changed files with 21 additions and 17 deletions
@@ -78,8 +78,6 @@ func (l *SendEmailCodeLogic) SendEmailCode(req *types.SendCodeRequest) (resp *ty
}
if constant.ParseVerifyType(req.Type) == constant.Register && m.Id > 0 {
return nil, errors.Wrapf(xerr.NewErrCode(xerr.UserExist), "mobile already bind")
} else if constant.ParseVerifyType(req.Type) == constant.Security && m.Id == 0 {
return nil, errors.Wrapf(xerr.NewErrCode(xerr.UserNotExist), "mobile not bind")
}
var payload CacheKeyPayload