进入房间新增校验

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

@@ -88,6 +88,7 @@ public enum ErrorCodeEnum {
POINT_AUDIT_NODE_ERROR(600005, "当前审批任务异常", null),
USER_NOT_TODO_AUDIT(600005, "当前用户没有待审批的任务", null),
NOT_ALLOW_MODIFY_WANT_SHOP_NUM(600006, "当前阶段不允许直接修改意向开店数量", null),
USER_NOT_ALLOW_ENTER_ROOM(600007, "当前用户不允许进入面试房间", null),
INTERVIEW_ENTER_FAIL(1021101, "进入面审间失败", null),
DINGDING_USER_NOT_EXIST(1021102, "用户钉钉信息不存在,无法发起资质审核!", null),

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);