refactor(class): 优化班级页面布局与删除功能

- 调整学生查询区域样式,使其占用两行空间
- 移除年级和单元列表中的删除按钮及新增操作相关代码
- 新增删除学生与班级前的确认弹窗提示,防止误操作
- 捕获删除确认框的取消或关闭事件,避免错误提示
- 主动导入 Element Plus 组件库样式文件,保证样式完整
- 修正角色同步代码中 Redis 写入方式,避免二次序列化问题
This commit is contained in:
lbw
2025-12-29 15:55:36 +08:00
parent 5858bf2ecc
commit 5ebf40101d
3 changed files with 16 additions and 45 deletions

View File

@@ -48,6 +48,7 @@ public class RoleServiceImpl implements RoleService {
List<RoleDO> roleDOs = roleIds.stream().map(roleId2RoleDO::get).toList();
List<String> user2RoleKeys = roleDOs.stream().map(RoleDO::getRoleKey).toList();
log.info("将用户 {} 的角色同步到 redis 中, {}", userId, roleKeys);
// 不要使用 JsonUtils.toJsonString(user2RoleKeys); 会造成二次序列化
redisTemplate.opsForValue().set(RoleConstants.buildUserRoleKey(userId), user2RoleKeys);
});
}