|
@@ -16,6 +16,7 @@ import com.ym.job.ScheduleManager;
|
|
|
import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.biz.dal.dao.*;
|
|
|
+import com.ym.mec.biz.dal.dto.BasicUserDto;
|
|
|
import com.ym.mec.biz.dal.dto.RongyunBasicUserDto;
|
|
|
import com.ym.mec.biz.dal.entity.CourseSchedule;
|
|
|
import com.ym.mec.biz.dal.entity.SysExamSong;
|
|
@@ -761,7 +762,6 @@ public class RoomServiceImpl implements RoomService {
|
|
|
CheckUtils.checkArgument(roomId != null, "roomId must't be null");
|
|
|
CheckUtils.checkArgument(userId != null, "userId must't be null");
|
|
|
CheckUtils.checkArgument(roomDao.existsByRid(roomId), "room not exist");
|
|
|
- CheckUtils.checkArgument(roomMemberDao.existsByRidAndUid(roomId, userId), "room member not exist");
|
|
|
SysUser authUser = sysUserFeignService.queryUserInfo();
|
|
|
log.info("controlDevice: userId={}, typeEnum={}, onOff={}", userId, typeEnum, enable);
|
|
|
|
|
@@ -843,8 +843,9 @@ public class RoomServiceImpl implements RoomService {
|
|
|
controlDevice(data.getRoomId(), e.getUid(), DeviceTypeEnum.MusicMode, data.getMusicModeOn());
|
|
|
}
|
|
|
} else if (data.getExamSongOn() != null) {
|
|
|
- for (RoomMember e:roomMembers) {
|
|
|
- controlDevice(data.getRoomId(), e.getUid(), DeviceTypeEnum.ExamSong, data.getExamSongOn());
|
|
|
+ List<BasicUserDto> students = courseScheduleStudentPaymentDao.findStudents(Long.parseLong(data.getRoomId().substring(1)));
|
|
|
+ for (BasicUserDto e:students) {
|
|
|
+ controlDevice(data.getRoomId(), e.getUserId().toString(), DeviceTypeEnum.ExamSong, data.getExamSongOn());
|
|
|
}
|
|
|
} else {
|
|
|
throw new ApiException(ErrorEnum.ERR_REQUEST_PARA_ERR);
|