|
|
@ -54,8 +54,8 @@ public class CaptchaController {
|
|
|
|
@GetMapping("/captchaSms")
|
|
|
|
@GetMapping("/captchaSms")
|
|
|
|
public R<Void> smsCaptcha(@NotBlank(message = "{user.phonenumber.not.blank}")
|
|
|
|
public R<Void> smsCaptcha(@NotBlank(message = "{user.phonenumber.not.blank}")
|
|
|
|
String phonenumber) {
|
|
|
|
String phonenumber) {
|
|
|
|
if (smsProperties.getEnabled()) {
|
|
|
|
if (!smsProperties.getEnabled()) {
|
|
|
|
R.fail("当前系统没有开启短信功能!");
|
|
|
|
return R.fail("当前系统没有开启短信功能!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String key = CacheConstants.CAPTCHA_CODE_KEY + phonenumber;
|
|
|
|
String key = CacheConstants.CAPTCHA_CODE_KEY + phonenumber;
|
|
|
|
String code = RandomUtil.randomNumbers(4);
|
|
|
|
String code = RandomUtil.randomNumbers(4);
|
|
|
|