进入房间新增校验

This commit is contained in:
zhangchenbiao
2024-04-10 14:30:12 +08:00
parent 2c3c4843e8
commit 263cef017b
2 changed files with 7 additions and 0 deletions

View File

@@ -264,6 +264,12 @@ public class LineInterviewServiceImpl extends LineFlowService implements LineInt
if (interviewInfo.getRoomStatus().equals(RoomStatus.CLOSED.getCode())) {
throw new ServiceException(ErrorCodeEnum.ROOM_STATUS_ERROR);
}
if(InterviewUserTypeEnum.INTERVIEWER.equals(userType) && !interviewUserId.equals(interviewInfo.getInterviewerUserId())){
throw new ServiceException(ErrorCodeEnum.USER_NOT_ALLOW_ENTER_ROOM);
}
if(InterviewUserTypeEnum.LINE.equals(userType) && !interviewUserId.equals(interviewInfo.getPartnerId())){
throw new ServiceException(ErrorCodeEnum.USER_NOT_ALLOW_ENTER_ROOM);
}
String userName = enterpriseUserDAO.getUserName(interviewInfo.getInterviewerUserId());
Long lineId = interviewInfo.getLineId();
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);