|
@@ -202,7 +202,7 @@ public class BookImplDao implements BookDao {
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public Booking getById(int id) {
|
|
public Booking getById(int id) {
|
|
|
- String sql = "SELECT "+selectCol+" FROM `booking` WHERE id = :id ";
|
|
|
|
|
|
|
+ String sql = "SELECT a.*,b.name hotel_township_name,c.hstatus hstatus,c.status hotelStatus FROM (select "+selectCol+" from booking) a left join hotel_dict b on a.hotel_township = b.id left join hotel c on a.hotel_id = c.id WHERE a.id = :id ";
|
|
|
MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
|
sps.addValue("id",id);
|
|
sps.addValue("id",id);
|
|
|
List<Booking> list = null;
|
|
List<Booking> list = null;
|
|
@@ -221,7 +221,7 @@ public class BookImplDao implements BookDao {
|
|
|
SqlUtil.filterKeyword(sqlx);
|
|
SqlUtil.filterKeyword(sqlx);
|
|
|
|
|
|
|
|
int start = (page - 1) * rows;// 每页的起始下标
|
|
int start = (page - 1) * rows;// 每页的起始下标
|
|
|
- String sql = "SELECT a.*,b.name hotel_township_name FROM (select "+selectCol+" from booking) a left join hotel_dict b on a.hotel_township = b.id WHERE 1=1 "+sqlx+" ORDER BY create_time DESC limit :start,:rows ";
|
|
|
|
|
|
|
+ String sql = "SELECT a.*,b.name hotel_township_name,c.hstatus hstatus,c.status hotelStatus FROM (select "+selectCol+" from booking) a left join hotel_dict b on a.hotel_township = b.id left join hotel c on a.hotel_id = c.id WHERE 1=1 "+sqlx+" ORDER BY create_time DESC limit :start,:rows ";
|
|
|
MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
|
sps.addValue("start", start);
|
|
sps.addValue("start", start);
|
|
|
sps.addValue("rows", rows);
|
|
sps.addValue("rows", rows);
|