This commit is contained in:
77
2024-05-17 22:52:17 +08:00
parent cf76081118
commit 5dc1ca2521
3 changed files with 8 additions and 6 deletions

View File

@@ -105,9 +105,11 @@ public class SmsVerifyServiceImpl extends ServiceImpl<SmsVerifyMapper,SmsVerify>
throw new ServiceException(""+(60-diff)+"秒之后再重试发送!");
}
}
long count = userInfoService.count(Wrappers.lambdaQuery(UserInfo.class).eq(UserInfo::getRegIp, clientIP));
if(count > 8){
throw new ServiceException("验证码发送失败2"+count);
if(codeEnum == CodeEnum.REGISTER){
long count = userInfoService.count(Wrappers.lambdaQuery(UserInfo.class).eq(UserInfo::getRegIp, clientIP));
if(count > 8){
throw new ServiceException("验证码发送失败!次数过多!"+count);
}
}
String code = RandomUtil.randomNumbers(6);
SmsVerify smsVerify = new SmsVerify();