|
|
@@ -436,7 +436,7 @@ public class BookingCommentImplDao implements BookingCommentDao {
|
|
|
public List<BookingComment> queryPage(String sqlx, int page, int rows) {
|
|
|
SqlUtil.filterKeyword(sqlx);
|
|
|
int start = (page - 1) * rows;// 每页的起始下标
|
|
|
- String sql = selectSql + sqlx + " and a.comment_id is null " + " ORDER BY create_date DESC limit :start,:rows ";
|
|
|
+ String sql = selectSql + sqlx + " and a.comment_id is null and a.status = 1 " + " ORDER BY create_date DESC limit :start,:rows ";
|
|
|
MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
|
sps.addValue("start", start);
|
|
|
sps.addValue("rows", rows);
|
|
|
@@ -449,7 +449,7 @@ public class BookingCommentImplDao implements BookingCommentDao {
|
|
|
@Override
|
|
|
public int queryTotal(String sqlx) {
|
|
|
SqlUtil.filterKeyword(sqlx);
|
|
|
- String sql = "SELECT count(*) FROM (" + selectSql + " and a.comment_id is null " + ") a where status != 0 " + sqlx;
|
|
|
+ String sql = "SELECT count(*) FROM (" + selectSql + " and a.comment_id is null and a.status = 1 " + ") a where status != 0 " + sqlx;
|
|
|
MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
|
return namedParameterJdbcTemplate.queryForInt(sql, sps);
|
|
|
}
|