feat(meeting): 实现学生排序功能并优化Redis存储
- 将Redis中的学生排序存储从长ID改为短ID - 在监控端按studentListForSort顺序重新排列学生列表 - 添加新加入学生的处理逻辑 - 实现WebSocket消息处理学生排序变更事件 - 更新类型定义支持学生排序变更数据结构 - 优化Redis服务注释说明短ID存储格式
This commit is contained in:
@ -74,8 +74,8 @@ export class MeetingRedisService {
|
||||
* 用途:存储学生列表的排序顺序
|
||||
* 数据结构:List
|
||||
* Key 格式:meeting:student-order:{roomId}
|
||||
* List 内容:按顺序存储学生的长 ID (字符串)
|
||||
* 适用场景:教师端拖动排序后,监控端按相同顺序显示
|
||||
* List 内容:按顺序存储学生的短 ID (数字字符串)
|
||||
* 适用场景:教师端拖动排序后,监控端和学生端按相同顺序显示
|
||||
* 过期时间:24 小时
|
||||
*/
|
||||
STUDENT_ORDER: 'meeting:student-order:',
|
||||
@ -518,7 +518,7 @@ export class MeetingRedisService {
|
||||
/**
|
||||
* 获取学生排序顺序
|
||||
* @param roomId - 房间 ID
|
||||
* @returns 学生长 ID 数组 (按排序顺序),未设置返回空数组
|
||||
* @returns 学生短 ID 数组 (按排序顺序),未设置返回空数组
|
||||
*/
|
||||
async getStudentOrder(roomId: string): Promise<number[]> {
|
||||
const key = `${this.KEY_PREFIX.STUDENT_ORDER}${roomId}`;
|
||||
|
||||
Reference in New Issue
Block a user