|
|
@@ -8,6 +8,7 @@ import com.happy.Until.SqlUtil;
|
|
|
import com.happy.Until.UUIDUtil;
|
|
|
import com.happy.dao.BookingComplainDao;
|
|
|
import com.happy.dto.IPage;
|
|
|
+import com.happy.vo.BookingComplaintVo;
|
|
|
import com.happy.vo.ComplaintPageVo;
|
|
|
import com.happy.vo.DetailsVo;
|
|
|
import com.happy.vo.ProgressDetailsVo;
|
|
|
@@ -42,16 +43,26 @@ public class BookingComplainImplDao implements BookingComplainDao {
|
|
|
" left join users u on a.create_id = u.id " +
|
|
|
" where a.status != 0 ";
|
|
|
|
|
|
+ private String selectLeftSql = "select " +
|
|
|
+ " bk.order_num,u.user_phone as complainPhone,m.corpn_phone as hotelPhone,a.id,a.booking_id,a.hotel_id,a.house_id,a.title,a.content,a.create_id,a.create_date,a.modify_date,a.status,h.h_name as house_name,h2.hname as hotel_name" +
|
|
|
+ " from booking_complaint a " +
|
|
|
+ " left join house h on a.house_id = h.id " +
|
|
|
+ " left join hotel h2 on a.hotel_id = h2.id "+
|
|
|
+ " left join booking bk on a.booking_id = bk.id"+
|
|
|
+ " left join admin_manager m on h2.manager_id = m.id " +
|
|
|
+ " left join users u on a.create_id = u.id " +
|
|
|
+ " where a.status != 0 ";
|
|
|
+
|
|
|
@Override
|
|
|
- public List<BookingComplaint> queryPage(String sqlx, int page, int rows) {
|
|
|
+ public List<BookingComplaintVo> queryPage(String sqlx, int page, int rows) {
|
|
|
SqlUtil.filterKeyword(sqlx);
|
|
|
int start = (page - 1) * rows;// 每页的起始下标
|
|
|
- String sql = selectSql + sqlx + "and a.status != 0" +" ORDER BY id DESC limit :start,:rows ";
|
|
|
+ String sql = selectLeftSql + sqlx + "and a.status != 0" +" ORDER BY createDate DESC limit :start,:rows ";
|
|
|
MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
|
sps.addValue("start", start);
|
|
|
sps.addValue("rows", rows);
|
|
|
- List<BookingComplaint> list = namedParameterJdbcTemplate.query(sql, sps,
|
|
|
- new BeanPropertyRowMapper<>(BookingComplaint.class));
|
|
|
+ List<BookingComplaintVo> list = namedParameterJdbcTemplate.query(sql, sps,
|
|
|
+ new BeanPropertyRowMapper<>(BookingComplaintVo.class));
|
|
|
if (list != null && list.size() > 0) return list;
|
|
|
return null;
|
|
|
}
|