校验时间是否有冲突,时间是就是看两个时间断是否有交集(写法有两种):
a.SELECT * FROM xxx WHERE (startTime > a AND startTime < b) OR (startTime < a AND endTime > b) OR (endTime > a AND endTime < b)
b.SELECT * FROM xxx WHERE NOT ((endTime < a) OR (startTime > b))