From 0fa007006227c2c6d136fa2c0de269c65c1b45e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90li?= <15040126243@163.com> Date: Tue, 16 Aug 2022 16:30:56 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E7=9F=AD=E4=BF=A1?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=98=AF=E5=90=A6=E5=90=AF=E7=94=A8=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E4=B8=8D=E7=94=9F=E6=95=88BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/web/controller/common/CaptchaController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java index 2680c01e..60c632a9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java @@ -54,8 +54,8 @@ public class CaptchaController { @GetMapping("/captchaSms") public R smsCaptcha(@NotBlank(message = "{user.phonenumber.not.blank}") String phonenumber) { - if (smsProperties.getEnabled()) { - R.fail("当前系统没有开启短信功能!"); + if (!smsProperties.getEnabled()) { + return R.fail("当前系统没有开启短信功能!"); } String key = CacheConstants.CAPTCHA_CODE_KEY + phonenumber; String code = RandomUtil.randomNumbers(4);