Browse Source

优化会议管理-会议预约接口,解决同一会议室,重复时间段预约成功的问题

james 1 year ago
parent
commit
09496daadf

+ 1 - 1
service-meeting/service-meeting-biz/src/main/java/com/usky/meeting/repository/MeetingInfoRepository.java

@@ -160,7 +160,7 @@ public interface MeetingInfoRepository extends JpaRepository<MeetingInfo, Long>,
             " date_format(a.end_date,'%Y-%m-%d %H:%i:%s') as endDate" +
             " from meeting_info as a" +
             " where a.room_id = :roomId" +
-            " and ((start_date <= :startDate and end_date >= :startDate and end_date != :startDate) or (start_date <= :endDate and end_date >= :endDate and start_date != :endDate))" +
+            " and ((a.start_date <= :startDate and a.end_date >= :startDate and a.end_date != :startDate) or (a.start_date <= :endDate and a.end_date >= :endDate and a.start_date != :endDate))" +
             " and if(:meetingId != '',a.meeting_id != :meetingId,1=1)" +
             " and a.is_cancel = 0 and a.meeting_status != 2 and a.approve_status != 2",nativeQuery = true)
     List<Map<String,String>> checkDmRoomMeetingDate(@Param("roomId") Long roomId,