取出这个时间段内的每一天。sql计算每一天的可用房间数,可预约房间数最少的一天就是这个时间段内可预约的房间数
select <if test="null != dateList and dateList.size > 1"> LEAST( <foreach collection="dateList" index="index" item="item" separator=","> </foreach>) AS num </if> <if test="null != dateList and dateList.size == 1"> <foreach collection="dateList" index="index" item="item" open="(" separator="," close=")"> </foreach> AS num </if> FROM 表名