|  |  |  | 
|---|
|  |  |  | //发送会议预约成功通知 | 
|---|
|  |  |  | this.sendNotice(bookings, MeetConstants.TWO); | 
|---|
|  |  |  | //发送微信订阅通知 | 
|---|
|  |  |  | sendWxMessage.bookingsReservation(systemUserMapper.selectById(bookings.getCreator()), bookings, roomsMapper.selectById(bookings.getRoomId())); | 
|---|
|  |  |  | //        sendWxMessage.bookingsReservation(systemUserMapper.selectById(bookings.getCreator()), bookings, roomsMapper.selectById(bookings.getRoomId())); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return bookings.getId(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | throw  new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"会议仅可以提前"+beforeMinutes+"分钟开始"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //查询是否存在其他未开始的会议 防止颗粒度与提前开始的问题 | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(bookingsMapper.selectCount(new QueryWrapper<Bookings>() | 
|---|
|  |  |  | .lambda() | 
|---|
|  |  |  | .apply(" now() < START_TIME and   END_TIME <=  '" + DateUtil.DateToStr(bookings.getStartTime(),"yyyy-MM-dd HH:mm:ss") +"'" ) | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(bookingsMapper.selectCount(new QueryWrapper<Bookings>() | 
|---|
|  |  |  | .lambda() | 
|---|
|  |  |  | .apply(" END_TIME > now() and START_TIME < now() ") | 
|---|
|  |  |  | .apply(" (  END_TIME > now() and START_TIME < now() ) or  ( END_TIME > now() and  START_TIME_REAL < now() )  ") | 
|---|
|  |  |  | .isNotNull(Bookings::getStartTimeReal) | 
|---|
|  |  |  | .isNull(Bookings::getDoneDate) | 
|---|
|  |  |  | .eq(Bookings::getStatus,Constants.ZERO) | 
|---|
|  |  |  | 
|---|
|  |  |  | bookingsMapper.updateById(bookings); | 
|---|
|  |  |  | this.sendNotice(bookings, MeetConstants.ONE); | 
|---|
|  |  |  | //发送微信通知 | 
|---|
|  |  |  | sendWxMessage.bookingsStart(systemUserMapper.selectById(bookings.getCreator()), bookings, roomsMapper.selectById(bookings.getRoomId())); | 
|---|
|  |  |  | //            sendWxMessage.bookingsStart(systemUserMapper.selectById(bookings.getCreator()), bookings, roomsMapper.selectById(bookings.getRoomId())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|