查詢一個時間段與資料庫存在得時間段是否有交集
阿新 • • 發佈:2020-12-30
SELECT count( id ) FROM th_flow_part_time WHERE ( (start_time between #{startTime} and #{endTime}) or (end_time between #{startTime} and #{endTime}) or (start_time > #{startTime} and end_time < #{endTime}) or(start_time < #{startTime} and end_time > #{endTime}) ) AND is_delete = 0