调整绑定手机号

This commit is contained in:
chy
2025-07-10 16:37:10 +08:00
parent c63553df32
commit 49fd919fe1
8 changed files with 39 additions and 14 deletions

View File

@ -296,6 +296,9 @@ func (s *sUser) BindPhone(ctx context.Context, in *model.UserBindPhoneIn) (out *
if err != nil {
return nil, ecode.Fail.Sub("绑定手机号失败")
}
if _, err := g.Redis().Del(ctx, fmt.Sprintf(consts.UserBindPhoneKey, in.Phone)); err != nil {
return nil, ecode.Fail.Sub("删除验证码失败")
}
return &model.UserBindPhoneOut{
Success: true,
}, nil