|
@@ -89,7 +89,22 @@ public class RoomServiceImpl implements RoomService {
|
|
|
@Override
|
|
|
public void startRecord(String roomId) throws Exception {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
- IMApiResultInfo imApiResultInfo = imHelper.startRecord(sysUser.getId().toString(), roomId);
|
|
|
+ Integer userId = sysUser.getId();
|
|
|
+ ExamRoom examRoom = eduUserFeignService.getExamRoom(Integer.parseInt(roomId));
|
|
|
+ boolean isAssistant = false;
|
|
|
+ if (StringUtils.isNotEmpty(examRoom.getAssistantTeacherUserIdList())){
|
|
|
+ List<String> list = Arrays.asList(examRoom.getAssistantTeacherUserIdList().split(","));
|
|
|
+ if(list.contains(userId)){
|
|
|
+ isAssistant = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(sysUser.getId().equals(examRoom.getMainTeacherUserId())){
|
|
|
+ return;
|
|
|
+ }else if(isAssistant){
|
|
|
+ return;
|
|
|
+ }else {
|
|
|
+ imHelper.startRecord(userId.toString(), roomId);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -349,8 +364,8 @@ public class RoomServiceImpl implements RoomService {
|
|
|
eduUserFeignService.updateFinishedExam(registrationId,0);
|
|
|
}
|
|
|
this.publishMessage(eduUserFeignService.getPublishMessage(registrationId));
|
|
|
- IMApiResultInfo imApiResultInfo = imHelper.startRecord(userId, roomId);
|
|
|
- eduUserFeignService.updateSessionId(registrationId,imApiResultInfo.getSessionId());
|
|
|
+// IMApiResultInfo imApiResultInfo = imHelper.startRecord(userId, roomId);
|
|
|
+// eduUserFeignService.updateSessionId(registrationId,imApiResultInfo.getSessionId());
|
|
|
}
|
|
|
return baseResponse;
|
|
|
}
|