k94314517
2024-10-16 39aea9fa06482f060eb6d1b939b2778156f028fc
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());
@@ -1204,7 +1204,9 @@
                .eq("b.STATUS",MeetConstants.ZERO)
                .eq("a.ISDELETED",MeetConstants.ZERO)
                .eq("a.status",Constants.ZERO)
                .ne("a.status",Constants.TWO)
                .like("a.start_time",DateUtil.getCurrDate())
                .apply(" not exists ( select 1  from  meeting_book mb where mb.END_TIME < now() and  mb.id = a.id and START_TIME_REAL is null  )   ")
                .orderByAsc("a.start_time")
        );
        this.dealMeetingStatus(meetingList);