fix 修复 短信功能是否启用判断不生效BUG

feature/model
疯狂的狮子li 2 years ago
parent 9f2fe90e50
commit 0fa0070062

@ -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);

Loading…
Cancel
Save