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))))