feat(system): 添加用户公告阅读状态查询功能并优化邮箱验证码缓存键生成- 在UserNoticeMapper.xml中新增isRead查询条件,支持按阅读状态筛选公告
- 修改UserServiceImpl.java中的邮箱验证码缓存键生成方式,使用StrUtil.format替代字符串拼接,提高代码可读性和维护性
This commit is contained in:
@@ -648,7 +648,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|||||||
|
|
||||||
// 获取缓存的验证码
|
// 获取缓存的验证码
|
||||||
String email = form.getEmail();
|
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);
|
String cachedVerifyCode = redisTemplate.opsForValue().get(redisCacheKey);
|
||||||
|
|
||||||
if (StrUtil.isBlank(cachedVerifyCode)) {
|
if (StrUtil.isBlank(cachedVerifyCode)) {
|
||||||
|
|||||||
@@ -21,6 +21,9 @@
|
|||||||
<if test="queryParams.title != null and queryParams.title != ''">
|
<if test="queryParams.title != null and queryParams.title != ''">
|
||||||
AND t2.title LIKE CONCAT('%',#{queryParams.title},'%')
|
AND t2.title LIKE CONCAT('%',#{queryParams.title},'%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="queryParams.isRead != null">
|
||||||
|
AND t1.is_read = #{queryParams.isRead}
|
||||||
|
</if>
|
||||||
ORDER BY
|
ORDER BY
|
||||||
t2.publish_time DESC,
|
t2.publish_time DESC,
|
||||||
t2.create_time DESC
|
t2.create_time DESC
|
||||||
|
|||||||
Reference in New Issue
Block a user