feat: 短信发送提示微调

This commit is contained in:
landaiqing
2024-05-12 02:11:53 +08:00
parent 7602e43db6
commit 57ec16da5b

View File

@@ -55,13 +55,13 @@ public class SchisandraSmsController {
String configId = redisUtil.get(SmsConfigConstant.SMS_CONFIG_KEY);
SmsResponse smsResponse=SmsFactory.getSmsBlend(configId).sendMessage(phone,code);
if (smsResponse.isSuccess()){
redisUtil.setNx(prefix, code, 60L,SECONDS);
return Result.ok();
redisUtil.setNx(prefix, code, 60L* 5,SECONDS);
return Result.ok("短信发送成功5 分钟内有效!");
}else {
return Result.fail();
return Result.fail("短信发送失败,请重试!");
}
}else {
return Result.fail("发送频繁,请稍后重试");
return Result.fail("发送。请注意查看!");
}
}