From 2df5027c0ffbdd9e7e8fa240b041ab0e07b43fa7 Mon Sep 17 00:00:00 2001 From: tone Date: Thu, 18 Dec 2025 11:27:16 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=B0=83=E6=95=B4=E7=99=BB=E9=99=86?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=8124=E5=B0=8F=E6=97=B6=E6=9C=80?= =?UTF-8?q?=E5=A4=9A5=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/backend/src/sms/sms.service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/backend/src/sms/sms.service.ts b/apps/backend/src/sms/sms.service.ts index 95111e3..ee638e8 100644 --- a/apps/backend/src/sms/sms.service.ts +++ b/apps/backend/src/sms/sms.service.ts @@ -53,10 +53,10 @@ export class SmsService { }); if (recentRecord && recentRecord.createdAt > oneMinuteAgo) { - throw new BusinessException({ message: '操作太快了,一分钟后重试吧' }); // 距离上一条不足 1 分钟 + throw new BusinessException({ message: '操作太快了,稍后再重试吧' }); // 距离上一条不足 1 分钟 } - // 2. 检查 24 小时内是否超过 10 条 + // 2. 检查 24 小时内是否超过 5 条 const count = await this.smsRecordRepository.count({ where: { phone, @@ -65,8 +65,8 @@ export class SmsService { }, }); - if (count >= 10) { - throw new BusinessException({ message: '操作太快了,稍后再重试吧' }); // 24 小时超过 10 条 + if (count >= 5) { + throw new BusinessException({ message: '操作太快了,稍后再重试吧' }); // 24 小时超过 5 条 } }