feat(system): 添加用户公告阅读状态查询功能并优化邮箱验证码缓存键生成- 在UserNoticeMapper.xml中新增isRead查询条件,支持按阅读状态筛选公告

- 修改UserServiceImpl.java中的邮箱验证码缓存键生成方式,使用StrUtil.format替代字符串拼接,提高代码可读性和维护性
This commit is contained in:
theo
2025-09-29 10:13:32 +08:00
parent 4d3e4832e8
commit adfd4bc1ea
2 changed files with 4 additions and 1 deletions

View File

@@ -648,7 +648,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
// 获取缓存的验证码
String email = form.getEmail();
String redisCacheKey = RedisConstants.Captcha.EMAIL_CODE + email;
String redisCacheKey = StrUtil.format(RedisConstants.Captcha.EMAIL_CODE, email);
String cachedVerifyCode = redisTemplate.opsForValue().get(redisCacheKey);
if (StrUtil.isBlank(cachedVerifyCode)) {