|
@@ -336,7 +336,7 @@ public class BookingCommentImplDao implements BookingCommentDao {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public CommentDetailsVo commentDetails(String bookingCommentId) {
|
|
|
|
|
|
|
+ public CommentDetailsVo commentDetails(String bookingCommentId,Integer status) {
|
|
|
String sql = "SELECT\n" +
|
|
String sql = "SELECT\n" +
|
|
|
"\tbc.id AS id,\n" +
|
|
"\tbc.id AS id,\n" +
|
|
|
"\tu.user_name AS userName,\n" +
|
|
"\tu.user_name AS userName,\n" +
|
|
@@ -361,9 +361,10 @@ public class BookingCommentImplDao implements BookingCommentDao {
|
|
|
"\tLEFT JOIN hotel_dict hd ON hd.id = b.hotel_township \n" +
|
|
"\tLEFT JOIN hotel_dict hd ON hd.id = b.hotel_township \n" +
|
|
|
"\tAND hd.`status` = 1\n" +
|
|
"\tAND hd.`status` = 1\n" +
|
|
|
"\tLEFT JOIN ( SELECT comment_parent_id, count( 1 ) commentSum FROM booking_comment WHERE comment_parent_id IS NOT NULL AND `status` = 1 GROUP BY comment_parent_id ) cc ON bc.id = cc.comment_parent_id\n" +
|
|
"\tLEFT JOIN ( SELECT comment_parent_id, count( 1 ) commentSum FROM booking_comment WHERE comment_parent_id IS NOT NULL AND `status` = 1 GROUP BY comment_parent_id ) cc ON bc.id = cc.comment_parent_id\n" +
|
|
|
- "\tWHERE bc.`status`=1 and bc.id= :bookingCommentId";
|
|
|
|
|
|
|
+ "\tWHERE bc.`status`=:status and bc.id= :bookingCommentId";
|
|
|
MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
|
sps.addValue("bookingCommentId", bookingCommentId);
|
|
sps.addValue("bookingCommentId", bookingCommentId);
|
|
|
|
|
+ sps.addValue("status", status);
|
|
|
List<CommentDetailsVo> list = null;
|
|
List<CommentDetailsVo> list = null;
|
|
|
try {
|
|
try {
|
|
|
list = namedParameterJdbcTemplate.query(sql, sps,
|
|
list = namedParameterJdbcTemplate.query(sql, sps,
|
|
@@ -591,7 +592,7 @@ public class BookingCommentImplDao implements BookingCommentDao {
|
|
|
"\t count(1) \n" +
|
|
"\t count(1) \n" +
|
|
|
"FROM\n" +
|
|
"FROM\n" +
|
|
|
"\t`booking` b\n" +
|
|
"\t`booking` b\n" +
|
|
|
- "\tLEFT JOIN booking_comment bc on b.id=bc.booking_id AND bc.comment_parent_id IS NULL AND bc.`status`=1\n" +
|
|
|
|
|
|
|
+ "\tLEFT JOIN booking_comment bc on b.id=bc.booking_id AND bc.comment_parent_id IS NULL AND bc.`status`!=0\n" +
|
|
|
"\t\n" +
|
|
"\t\n" +
|
|
|
"\tLEFT JOIN users u on u.id =b.create_userid LEFT JOIN file_info fi on fi.link_id=b.house_id \n" +
|
|
"\tLEFT JOIN users u on u.id =b.create_userid LEFT JOIN file_info fi on fi.link_id=b.house_id \n" +
|
|
|
"\t\n" +
|
|
"\t\n" +
|