摩托车网站建设,网页设计与制作教程教科书,wordpress tipton,中咨建设监理有限公司网站会议室预约时#xff0c;判断能否被预约#xff0c;即查询是否已经有预约记录#xff0c;存在不能被预约。
s,e#xff1b;表示已经预约的开始结束时间#xff1b; ns,ne#xff0c;表示表单提交的预约时间#xff1b;
只需要(ns,ne)与(s,e)区间没有交集#xff0c;可…会议室预约时判断能否被预约即查询是否已经有预约记录存在不能被预约。
s,e表示已经预约的开始结束时间 ns,ne表示表单提交的预约时间
只需要(ns,ne)与(s,e)区间没有交集可以被预约 nss,nes; 没有交集 nss,nes;有交集 sns e;有交集 nse;没有交集
数据库中查询有交集大于0存在交集无法预约 select idselectBuiMeetingRecordExist parameterTypeBuiMeetingRecord resultTypejava.lang.Integer select count(*) from omp_bui_meeting_record where bui_id #{buiId} and ( #{startTime} lt; start_time and start_time lt; #{endTime}) or (start_time lt; #{startTime} and #{startTime} lt; end_time) /select
mybatis中比较运算符需要转义