This commit is contained in:
zhangchenbiao
2024-04-10 10:47:55 +08:00
parent 4ebf5c184a
commit 56244691ad
3 changed files with 5 additions and 2 deletions

View File

@@ -88,6 +88,9 @@ public class AppointmentTimeVO {
}
public static boolean isOverlapping(LocalDateTime start1, LocalDateTime end1, LocalDateTime start2, LocalDateTime end2) {
if(start1.equals(start2) && end1.equals(end2)){
return true;
}
// 如果第二个时间段的开始时间在第一个时间段内(包括两端点)
if (start2.isAfter(start1) && start2.isBefore(end1)) {
return true;