|
@@ -139,11 +139,11 @@ public class BookingComplainImplDao implements BookingComplainDao {
|
|
|
"\tb.order_end_time as orderEndTime,\n" +
|
|
"\tb.order_end_time as orderEndTime,\n" +
|
|
|
"\tb.pay_account as payAccount,\n" +
|
|
"\tb.pay_account as payAccount,\n" +
|
|
|
"\tb.house_order_number as houseOrderNumber,\n" +
|
|
"\tb.house_order_number as houseOrderNumber,\n" +
|
|
|
- "\tb.house_name as houseName, fi.url as url, \n" +
|
|
|
|
|
|
|
+ "\tb.house_name as houseName, fi2.url as url, \n" +
|
|
|
"\t( SELECT bcp.progress_type FROM booking_complaint_progress bcp WHERE bcp.complaint_id = bc.id ORDER BY bcp.create_date DESC LIMIT 1 ) AS progressType \n" +
|
|
"\t( SELECT bcp.progress_type FROM booking_complaint_progress bcp WHERE bcp.complaint_id = bc.id ORDER BY bcp.create_date DESC LIMIT 1 ) AS progressType \n" +
|
|
|
"FROM\n" +
|
|
"FROM\n" +
|
|
|
"\t`booking_complaint` bc\n" +
|
|
"\t`booking_complaint` bc\n" +
|
|
|
- "\tLEFT JOIN booking b ON b.id = bc.booking_id AND b.status_del=1 LEFT JOIN file_info fi on bc.house_id=fi.link_id where bc.create_id=:usersId limit :start,:rows )bc2 ORDER BY bc2.progressType asc ,bc2.dateTime DESC ";
|
|
|
|
|
|
|
+ "\tLEFT JOIN booking b ON b.id = bc.booking_id AND b.status_del=1 LEFT JOIN ( SELECT fi.link_id, GROUP_CONCAT( fi.url ) AS url FROM file_info fi GROUP BY fi.link_id ) fi2 ON fi2.link_id = bc.id where bc.create_id=:usersId limit :start,:rows )bc2 ORDER BY bc2.progressType asc ,bc2.dateTime DESC ";
|
|
|
MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
|
sps.addValue("start", start);
|
|
sps.addValue("start", start);
|
|
|
sps.addValue("rows", rows);
|
|
sps.addValue("rows", rows);
|
|
@@ -160,7 +160,7 @@ public class BookingComplainImplDao implements BookingComplainDao {
|
|
|
"\t count(1) \n" +
|
|
"\t count(1) \n" +
|
|
|
"FROM\n" +
|
|
"FROM\n" +
|
|
|
"\t`booking_complaint` bc\n" +
|
|
"\t`booking_complaint` bc\n" +
|
|
|
- "\tLEFT JOIN booking b ON b.id = bc.booking_id AND b.status_del=1 LEFT JOIN file_info fi on bc.house_id=fi.link_id where bc.create_id=:usersId ";
|
|
|
|
|
|
|
+ "\tLEFT JOIN booking b ON b.id = bc.booking_id AND b.status_del=1 LEFT JOIN ( SELECT fi.link_id, GROUP_CONCAT( fi.url ) AS url FROM file_info fi GROUP BY fi.link_id ) fi2 ON fi2.link_id = bc.id where bc.create_id=:usersId ";
|
|
|
|
|
|
|
|
MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
|
sps.addValue("usersId", usersId);
|
|
sps.addValue("usersId", usersId);
|