|
@@ -70,7 +70,7 @@ public class BookingCommentImplDao implements BookingCommentDao {
|
|
|
sps.addValue("create_username", bookingComment.getCreateUsername());
|
|
sps.addValue("create_username", bookingComment.getCreateUsername());
|
|
|
sps.addValue("create_date", bookingComment.getCreateDate());
|
|
sps.addValue("create_date", bookingComment.getCreateDate());
|
|
|
sps.addValue("modify_date", bookingComment.getModifyDate());
|
|
sps.addValue("modify_date", bookingComment.getModifyDate());
|
|
|
- sps.addValue("status", 1);
|
|
|
|
|
|
|
+ sps.addValue("status", 2);
|
|
|
|
|
|
|
|
String id = "";
|
|
String id = "";
|
|
|
if (bookingComment.getId() == null) {
|
|
if (bookingComment.getId() == null) {
|
|
@@ -521,7 +521,7 @@ public class BookingCommentImplDao implements BookingCommentDao {
|
|
|
"\t,b.create_userid ,fi.url as url\n" +
|
|
"\t,b.create_userid ,fi.url as url\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" +
|
|
@@ -676,6 +676,110 @@ public class BookingCommentImplDao implements BookingCommentDao {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public List<PersonageCommentVo> auditPageComment(String usersId, int page, int rows) {
|
|
|
|
|
+ int start = (page - 1) * rows;// ÿҳµÄÆðʼÏÂ
|
|
|
|
|
+ String sql = "SELECT\n" +
|
|
|
|
|
+ "\tb.id AS id,\n" +
|
|
|
|
|
+ "\tbc.id AS bookingCommentId,\n" +
|
|
|
|
|
+ "\tb.hotel_name AS hotelName,\n" +
|
|
|
|
|
+ "\tb.house_order_number AS houseOrderNumber,\n" +
|
|
|
|
|
+ "\tb.house_name AS houseName,\n" +
|
|
|
|
|
+ "\tb.live_time AS liveTime,\n" +
|
|
|
|
|
+ "\tb.check_out_time AS checkOutTime,\n" +
|
|
|
|
|
+ "\tb.pay_account AS payAccount ,fi.url as url\n" +
|
|
|
|
|
+ "FROM\n" +
|
|
|
|
|
+ "\t`booking` b\n" +
|
|
|
|
|
+ "\tINNER JOIN booking_comment bc ON b.id = bc.booking_id \n" +
|
|
|
|
|
+ "\tAND bc.comment_parent_id IS NULL \n" +
|
|
|
|
|
+ "\tAND bc.`status` = 2\n" +
|
|
|
|
|
+ "\tLEFT JOIN users u ON u.id = b.create_userid LEFT JOIN file_info fi on fi.link_id=b.house_id \n" +
|
|
|
|
|
+ "WHERE\n" +
|
|
|
|
|
+ "\tu.id = :usersId \n" +
|
|
|
|
|
+ "\tAND b.order_status = 5 \n" +
|
|
|
|
|
+ "\tAND b.status_del =1 ORDER BY b.order_start_time DESC LIMIT :start,:rows";
|
|
|
|
|
+ MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
|
|
|
+ sps.addValue("start", start);
|
|
|
|
|
+ sps.addValue("rows", rows);
|
|
|
|
|
+ sps.addValue("usersId", usersId);
|
|
|
|
|
+ List<PersonageCommentVo> list = namedParameterJdbcTemplate.query(sql, sps,
|
|
|
|
|
+ new BeanPropertyRowMapper<>(PersonageCommentVo.class));
|
|
|
|
|
+ if (list != null && list.size() > 0) return list;
|
|
|
|
|
+
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public int auditTotalComment(String usersId) {
|
|
|
|
|
+ String sql = "SELECT\n" +
|
|
|
|
|
+ "\t count(1) \n" +
|
|
|
|
|
+ "FROM\n" +
|
|
|
|
|
+ "\t`booking` b\n" +
|
|
|
|
|
+ "\tINNER JOIN booking_comment bc ON b.id = bc.booking_id \n" +
|
|
|
|
|
+ "\tAND bc.comment_parent_id IS NULL \n" +
|
|
|
|
|
+ "\tAND bc.`status` = 2\n" +
|
|
|
|
|
+ "\tLEFT JOIN users u ON u.id = b.create_userid LEFT JOIN file_info fi on fi.link_id=b.house_id \n" +
|
|
|
|
|
+ "WHERE\n" +
|
|
|
|
|
+ "\tu.id = :usersId \n" +
|
|
|
|
|
+ "\tAND b.order_status = 5 \n" +
|
|
|
|
|
+ "\tAND b.status_del =1 ";
|
|
|
|
|
+ MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
|
|
|
+ sps.addValue("usersId", usersId);
|
|
|
|
|
+ return namedParameterJdbcTemplate.queryForInt(sql, sps);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public List<PersonageCommentVo> refuseAuditPageComment(String usersId, int page, int rows) {
|
|
|
|
|
+ int start = (page - 1) * rows;// ÿҳµÄÆðʼÏÂ
|
|
|
|
|
+ String sql = "SELECT\n" +
|
|
|
|
|
+ "\tb.id AS id,\n" +
|
|
|
|
|
+ "\tbc.id AS bookingCommentId,\n" +
|
|
|
|
|
+ "\tb.hotel_name AS hotelName,\n" +
|
|
|
|
|
+ "\tb.house_order_number AS houseOrderNumber,\n" +
|
|
|
|
|
+ "\tb.house_name AS houseName,\n" +
|
|
|
|
|
+ "\tb.live_time AS liveTime,\n" +
|
|
|
|
|
+ "\tb.check_out_time AS checkOutTime,\n" +
|
|
|
|
|
+ "\tb.pay_account AS payAccount ,fi.url as url\n" +
|
|
|
|
|
+ "FROM\n" +
|
|
|
|
|
+ "\t`booking` b\n" +
|
|
|
|
|
+ "\tINNER JOIN booking_comment bc ON b.id = bc.booking_id \n" +
|
|
|
|
|
+ "\tAND bc.comment_parent_id IS NULL \n" +
|
|
|
|
|
+ "\tAND bc.`status` = 3\n" +
|
|
|
|
|
+ "\tLEFT JOIN users u ON u.id = b.create_userid LEFT JOIN file_info fi on fi.link_id=b.house_id \n" +
|
|
|
|
|
+ "WHERE\n" +
|
|
|
|
|
+ "\tu.id = :usersId \n" +
|
|
|
|
|
+ "\tAND b.order_status = 5 \n" +
|
|
|
|
|
+ "\tAND b.status_del =1 ORDER BY b.order_start_time DESC LIMIT :start,:rows";
|
|
|
|
|
+ MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
|
|
|
+ sps.addValue("start", start);
|
|
|
|
|
+ sps.addValue("rows", rows);
|
|
|
|
|
+ sps.addValue("usersId", usersId);
|
|
|
|
|
+ List<PersonageCommentVo> list = namedParameterJdbcTemplate.query(sql, sps,
|
|
|
|
|
+ new BeanPropertyRowMapper<>(PersonageCommentVo.class));
|
|
|
|
|
+ if (list != null && list.size() > 0) return list;
|
|
|
|
|
+
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public int refuseAuditTotalComment(String usersId) {
|
|
|
|
|
+ String sql = "SELECT\n" +
|
|
|
|
|
+ "\t count(1) \n" +
|
|
|
|
|
+ "FROM\n" +
|
|
|
|
|
+ "\t`booking` b\n" +
|
|
|
|
|
+ "\tINNER JOIN booking_comment bc ON b.id = bc.booking_id \n" +
|
|
|
|
|
+ "\tAND bc.comment_parent_id IS NULL \n" +
|
|
|
|
|
+ "\tAND bc.`status` = 3\n" +
|
|
|
|
|
+ "\tLEFT JOIN users u ON u.id = b.create_userid LEFT JOIN file_info fi on fi.link_id=b.house_id \n" +
|
|
|
|
|
+ "WHERE\n" +
|
|
|
|
|
+ "\tu.id = :usersId \n" +
|
|
|
|
|
+ "\tAND b.order_status = 5 \n" +
|
|
|
|
|
+ "\tAND b.status_del =1 ";
|
|
|
|
|
+ MapSqlParameterSource sps = new MapSqlParameterSource();
|
|
|
|
|
+ sps.addValue("usersId", usersId);
|
|
|
|
|
+ return namedParameterJdbcTemplate.queryForInt(sql, sps);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public void appendValue(BookingComment bookingComment, StringBuffer stringBuffer, MapSqlParameterSource sps){
|
|
public void appendValue(BookingComment bookingComment, StringBuffer stringBuffer, MapSqlParameterSource sps){
|
|
|
if (!Func.checkNull(bookingComment.getCommentId())){
|
|
if (!Func.checkNull(bookingComment.getCommentId())){
|
|
|
stringBuffer.append(" comment_id=:comment_id ,");
|
|
stringBuffer.append(" comment_id=:comment_id ,");
|