Files
juwan-backend/app/email/api/internal/logic/email/forgotPasswordLogic.go
T
2026-04-23 14:58:25 +08:00

37 lines
891 B
Go

// Code scaffolded by goctl. Safe to edit.
// goctl 1.9.2
package email
import (
"context"
"juwan-backend/app/email/api/internal/svc"
"juwan-backend/app/email/api/internal/types"
"juwan-backend/common/redisx"
"github.com/zeromicro/go-zero/core/logx"
)
type ForgotPasswordLogic struct {
logx.Logger
ctx context.Context
svcCtx *svc.ServiceContext
}
// 忘记密码-发送验证码
func NewForgotPasswordLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ForgotPasswordLogic {
return &ForgotPasswordLogic{
Logger: logx.WithContext(ctx),
ctx: ctx,
svcCtx: svcCtx,
}
}
func (l *ForgotPasswordLogic) ForgotPassword(req *types.ForgotPasswordReq) (resp *types.SendVerificationCodeResp, err error) {
return NewSendVerificationCodeLogic(l.ctx, l.svcCtx).SendVerificationCode(&types.SendVerificationCodeReq{
Email: req.Email,
Scene: redisx.SCENE_RESET_PWD,
})
}