diff --git a/ruoyi-modules/ruoyi-resource/src/main/java/com/ruoyi/resource/controller/SysSmsController.java b/ruoyi-modules/ruoyi-resource/src/main/java/com/ruoyi/resource/controller/SysSmsController.java index d158968c..7dcf3aef 100644 --- a/ruoyi-modules/ruoyi-resource/src/main/java/com/ruoyi/resource/controller/SysSmsController.java +++ b/ruoyi-modules/ruoyi-resource/src/main/java/com/ruoyi/resource/controller/SysSmsController.java @@ -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 自行处理 (查数据库或写死均可)