|
@@ -1,9 +1,6 @@
|
|
|
package com.happy.dao.impl;
|
|
package com.happy.dao.impl;
|
|
|
|
|
|
|
|
-import com.happy.Model.Booking;
|
|
|
|
|
-import com.happy.Model.Holiday;
|
|
|
|
|
-import com.happy.Model.HouseNumber;
|
|
|
|
|
-import com.happy.Model.HouseNumberStatus;
|
|
|
|
|
|
|
+import com.happy.Model.*;
|
|
|
import com.happy.Until.BeanMapTool;
|
|
import com.happy.Until.BeanMapTool;
|
|
|
import com.happy.Until.SqlUtil;
|
|
import com.happy.Until.SqlUtil;
|
|
|
import com.happy.Until.UUIDUtil;
|
|
import com.happy.Until.UUIDUtil;
|
|
@@ -211,4 +208,18 @@ public class HouseNumberStatusImplDao implements HouseNumberStatusDao {
|
|
|
}
|
|
}
|
|
|
return paramMap;
|
|
return paramMap;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ public List<HouseNumberStatus> queryFreeHouse(String numberId,String startDate,String endDate){
|
|
|
|
|
+ String sql = "select * from `house_number_status` where number_id=:numberId and set_date>=:startDate and set_date<=:endDate and `status`>1 ";
|
|
|
|
|
+ MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
|
|
|
+ sps.addValue("numberId", numberId);
|
|
|
|
|
+ sps.addValue("startDate", startDate);
|
|
|
|
|
+ sps.addValue("endDate", endDate);
|
|
|
|
|
+ List<HouseNumberStatus> list = namedParameterJdbcTemplate.query(sql, sps,
|
|
|
|
|
+ new BeanPropertyRowMapper<>(HouseNumberStatus.class));
|
|
|
|
|
+ if (list != null && list.size() > 0) {
|
|
|
|
|
+ return list;
|
|
|
|
|
+ }
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|