MySQL查询 时间段范围
MySQL查询 时间段范围
select * from XXX where
((star_time > #{startTime} AND (#{endTime} > end_time OR (#{endTime} > star_time AND #{endTime} < end_time)))
OR
(star_time < #{startTime} AND (#{endTime}>end_time OR (#{startTime} > star_time AND #{startTime} < end_time))))