fix 修复 短信验证码 常量未更新问题
parent
b7e06158fe
commit
67c830c7d2
|
|
@ -2,6 +2,7 @@ package com.ruoyi.resource.controller;
|
|||
|
||||
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import com.ruoyi.common.core.constant.CacheConstants;
|
||||
import com.ruoyi.common.core.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.utils.SpringUtils;
|
||||
|
|
@ -46,7 +47,7 @@ public class SysSmsController extends BaseController {
|
|||
if (smsProperties.getEnabled()) {
|
||||
R.fail("当前系统没有开启短信功能!");
|
||||
}
|
||||
String key = Constants.CAPTCHA_CODE_KEY + phonenumber;
|
||||
String key = CacheConstants.CAPTCHA_CODE_KEY + phonenumber;
|
||||
String code = RandomUtil.randomNumbers(4);
|
||||
RedisUtils.setCacheObject(key, code, Duration.ofMinutes(Constants.CAPTCHA_EXPIRATION));
|
||||
// 验证码模板id 自行处理 (查数据库或写死均可)
|
||||
|
|
|
|||
Loading…
Reference in New Issue