From e23897a13f179b28965de3fce2314515f17a9dd0 Mon Sep 17 00:00:00 2001 From: liangzai <2440983361@qq.com> Date: Wed, 11 Feb 2026 20:15:24 +0800 Subject: [PATCH] f --- .../application/user/sms_code_application_service_impl.go | 2 +- internal/application/user/user_application_service_impl.go | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/internal/application/user/sms_code_application_service_impl.go b/internal/application/user/sms_code_application_service_impl.go index b1263c3..b0e488c 100644 --- a/internal/application/user/sms_code_application_service_impl.go +++ b/internal/application/user/sms_code_application_service_impl.go @@ -9,7 +9,7 @@ import ( func (s *UserApplicationServiceImpl) SendCode(ctx context.Context, cmd *commands.SendCodeCommand, clientIP, userAgent string) error { // 1. 检查频率限制 - if err := s.smsCodeService.CheckRateLimit(ctx, cmd.Phone, entities.SMSScene(cmd.Scene)); err != nil { + if err := s.smsCodeService.CheckRateLimit(ctx, cmd.Phone, entities.SMSScene(cmd.Scene), clientIP, userAgent); err != nil { return err } diff --git a/internal/application/user/user_application_service_impl.go b/internal/application/user/user_application_service_impl.go index c746740..ddd48ee 100644 --- a/internal/application/user/user_application_service_impl.go +++ b/internal/application/user/user_application_service_impl.go @@ -212,12 +212,6 @@ func (s *UserApplicationServiceImpl) LoginWithSMS(ctx context.Context, cmd *comm }, nil } -// SendCode 发送短信验证码 -// 业务流程:1. 安全检查与限流 2. 发送短信验证码 -func (s *UserApplicationServiceImpl) SendCode(ctx context.Context, cmd *commands.SendCodeCommand, clientIP, userAgent string) error { - return s.smsCodeService.SendCode(ctx, cmd.Phone, entities.SMSScene(cmd.Scene), clientIP, userAgent) -} - // ChangePassword 修改密码 // 业务流程:1. 修改用户密码 func (s *UserApplicationServiceImpl) ChangePassword(ctx context.Context, cmd *commands.ChangePasswordCommand) error {