mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2026-04-25 17:48:34 +08:00
bug fix:短信功能是否启用判断不生效
This commit is contained in:
@@ -44,8 +44,8 @@ public class SysSmsController extends BaseController {
|
||||
*/
|
||||
@GetMapping("/code")
|
||||
public R<Void> 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);
|
||||
|
||||
Reference in New Issue
Block a user