liukangdong
2024-10-12 9cf8c1d147e558c9a89b4ef14e79ea79902a7d9d
server/meeting/meeting_service/src/main/java/com/doumee/service/business/impl/BookingsServiceImpl.java
@@ -994,7 +994,7 @@
        if (!bookings.getCreator().equals(businessOverDTO.getUserId())) {
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "非你的预约记录,无法进行取消");
        }
        if (System.currentTimeMillis() > bookings.getStartTime().getTime()) {
        if (Objects.nonNull(bookings.getStartTimeReal()) && System.currentTimeMillis() > bookings.getStartTimeReal().getTime()) {
            throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(), "会议已开始,无法进行取消");
        }
        if(bookings.getStatus().equals(MeetConstants.ONE)){
@@ -1133,7 +1133,7 @@
                    .eq(Bookings::getRoomId,bookings.getRoomId())
                    .ne(Bookings::getId,bookings.getId())
            )>Constants.ZERO){
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"存在未开启会议,无法进行开始会议");
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"存在未开启会议,无法开始会议");
            };
            if(bookingsMapper.selectCount(new QueryWrapper<Bookings>()
@@ -1144,11 +1144,11 @@
                    .eq(Bookings::getStatus,Constants.ZERO)
                    .eq(Bookings::getRoomId,bookings.getRoomId())
            )>Constants.ZERO){
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"当前开启时间与其他会议存在冲突,无法进行开始会议");
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"当前开启时间与其他会议存在冲突,无法开始会议");
            };
        }else{
            if(bookings.getStartTime().getTime() > System.currentTimeMillis()){
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"未到会议申请开始时间,无法进行开始");
                throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"未到会议申请开始时间,无法开始");
            }
        }
        bookings.setStartTimeReal(new Date());