|
@@ -518,7 +518,7 @@ public class AppImplDao implements AppDao {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public List<Hotel> queryMs(String town){
|
|
public List<Hotel> queryMs(String town){
|
|
|
- String sql = "select a.*,b.name from (select a.*,b.hotel_township from `hotel` a left join `admin_manager` b on a.`manager_id`=b.`manager_id` where a.`status`=1 ) a right join `hotel_dict` b on a.hotel_township=b.`id` where b.name=:town ";
|
|
|
|
|
|
|
+ String sql = "select a.*,b.name from (select a.*,b.hotel_township,c.status_date from `hotel` a left join `admin_manager` b on a.`manager_id`=b.`manager_id` left join (select link_id,MAX(create_date) as status_date from `workflow` c where c.status=2 group by link_id ) c on a.`manager_id`=c.link_id where a.`status`=1 and b.`status`=1 and c.status_date is not null ) a right join `hotel_dict` b on a.hotel_township=b.`id` where b.name=:town ";
|
|
|
MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
|
sps.addValue("town", town);
|
|
sps.addValue("town", town);
|
|
|
List<Hotel> list = namedParameterJdbcTemplate.query(sql, sps,
|
|
List<Hotel> list = namedParameterJdbcTemplate.query(sql, sps,
|