|
@@ -286,7 +286,6 @@ public class RoomServiceImpl implements RoomService {
|
|
|
|
|
|
Long currentRoomId = Long.parseLong(redisTemplate.opsForValue().get(roomString));
|
|
Long currentRoomId = Long.parseLong(redisTemplate.opsForValue().get(roomString));
|
|
log.info("signInSuccess: currentRoomId={}", currentRoomId);
|
|
log.info("signInSuccess: currentRoomId={}", currentRoomId);
|
|
- redisTemplate.delete(roomString);
|
|
|
|
/*CourseSchedule schedule = courseScheduleDao.get(courseId);
|
|
/*CourseSchedule schedule = courseScheduleDao.get(courseId);
|
|
Date date = new Date();
|
|
Date date = new Date();
|
|
String classDate = DateUtil.format(schedule.getClassDate(), DateUtil.DEFAULT_PATTERN);
|
|
String classDate = DateUtil.format(schedule.getClassDate(), DateUtil.DEFAULT_PATTERN);
|
|
@@ -353,12 +352,16 @@ public class RoomServiceImpl implements RoomService {
|
|
}
|
|
}
|
|
log.info("leaveRoomSuccess: roomId={}, userId={}", roomId,userId);
|
|
log.info("leaveRoomSuccess: roomId={}, userId={}", roomId,userId);
|
|
RoleEnum roleEnum = RoleEnum.getEnumByValue(roomMember.getRole());
|
|
RoleEnum roleEnum = RoleEnum.getEnumByValue(roomMember.getRole());
|
|
- Long scheduleId = Long.parseLong(roomId.substring(1));
|
|
|
|
|
|
+ String roomString = roomId.substring(1);
|
|
|
|
+ Integer scheduleId = Integer.parseInt(roomString);
|
|
|
|
+ Long currentRoomId = Long.parseLong(redisTemplate.opsForValue().get(roomString));
|
|
|
|
+ log.info("leaveRoomSuccess: currentRoomId={}", currentRoomId);
|
|
|
|
+ redisTemplate.delete(roomString);
|
|
if(roleEnum == RoleTeacher){
|
|
if(roleEnum == RoleTeacher){
|
|
courseScheduleStudentPaymentDao.adjustPlayMidi(scheduleId.intValue(),null,null);
|
|
courseScheduleStudentPaymentDao.adjustPlayMidi(scheduleId.intValue(),null,null);
|
|
- teacherAttendanceService.addTeacherAttendanceRecord(scheduleId.intValue(),Integer.parseInt(userId), SignStatusEnum.SIGN_OUT,true,scheduleId);
|
|
|
|
|
|
+ teacherAttendanceService.addTeacherAttendanceRecord(scheduleId.intValue(),Integer.parseInt(userId), SignStatusEnum.SIGN_OUT,true,currentRoomId);
|
|
}else {
|
|
}else {
|
|
- studentAttendanceService.addStudentAttendanceRecord(scheduleId.intValue(),Integer.parseInt(userId), StudentAttendanceStatusEnum.NORMAL,SignStatusEnum.SIGN_OUT,scheduleId);
|
|
|
|
|
|
+ studentAttendanceService.addStudentAttendanceRecord(scheduleId.intValue(),Integer.parseInt(userId), StudentAttendanceStatusEnum.NORMAL,SignStatusEnum.SIGN_OUT,currentRoomId);
|
|
}
|
|
}
|
|
Room room = roomDao.findByRid(roomId);
|
|
Room room = roomDao.findByRid(roomId);
|
|
if (room == null) {
|
|
if (room == null) {
|