Kaynağa Gözat

Merge branch 'master' of https://e.coding.net/chuanghaikeji/jinganxiangsu/Homestay_app_houtai

夏文涛 2 yıl önce
ebeveyn
işleme
e0e80dd88f

+ 4 - 2
mhotel/src/com/happy/action/bookCommentAction.java

@@ -70,16 +70,18 @@ public class bookCommentAction extends BaseController implements ServletRequestA
         }
         if (checkoutStartTime != null){
             s1.append(" and DATE_FORMAT(b.check_out_time, '%Y-%m-%d') >= '").append(checkoutStartTime).append("' ");
-            s2.append(" and DATE_FORMAT(a.check_out_time, '%Y-%m-%d') >= '").append(checkoutStartTime).append("' ");
+            s2.append(" and DATE_FORMAT(a.checkOutTime, '%Y-%m-%d') >= '").append(checkoutStartTime).append("' ");
         }
         if (checkoutEndTime != null){
             s1.append(" and DATE_FORMAT(b.check_out_time, '%Y-%m-%d') <= '").append(checkoutEndTime).append("' ");
-            s2.append(" and DATE_FORMAT(a.check_out_time, '%Y-%m-%d') <= '").append(checkoutEndTime).append("' ");
+            s2.append(" and DATE_FORMAT(a.checkOutTime, '%Y-%m-%d') <= '").append(checkoutEndTime).append("' ");
         }
         if (status != null){
             s1.append(" and a.comment_status = ").append(status).append(" ");
             s2.append(" and a.comment_status = ").append(status).append(" ");
         }
+        System.out.println(s1.toString());
+        System.out.println(s2.toString());
         IPage<BookingComment> list = bookingCommentService.queryPage(s1.toString(),s2.toString(), page, rows);
         if(list != null && !"".equals(list)){
             resultJson.put("message", "查询分页成功");

+ 1 - 1
mhotel/src/com/happy/dao/impl/BookingCommentImplDao.java

@@ -351,7 +351,7 @@ public class BookingCommentImplDao implements BookingCommentDao {
                 "\t( SELECT round( AVG( score ), 1 ) FROM `booking_comment` WHERE comment_parent_id IS NULL AND `status` = 1 AND hotel_id = bc.hotel_id ) AS hotelScore,\n" +
                 "\thd.`name` AS hotelTownship,\n" +
                 "\tb.hotel_type AS hotelType,\n" +
-                "\tifnull( cc.commentSum, 0 ) AS commentCount ,h.cover_img as coverImg\n" +
+                "\tifnull( cc.commentSum, 0 ) AS commentCount ,h.cover_img as coverImg,b.hotel_id as hotelId \n" +
                 "FROM\n" +
                 "\t`booking_comment` bc\n" +
                 "\tLEFT JOIN users u ON u.id = bc.create_id\n" +

+ 2 - 2
mhotel/src/com/happy/dao/impl/HotelCouponImplDao.java

@@ -213,8 +213,8 @@ public class HotelCouponImplDao implements HotelCouponDao {
                 "\thc.deduction_price as deductionPrice,\n" +
                 "\thc.max_deduction AS maxDeduction,\n" +
                 "\thc.meet_price as meetPrice,\n" +
-                "\thc.effective_start_date AS  effectiveStartDate,(SELECT COUNT( hcs.complaint_id ) AS totalCount FROM `hotel_coupon_status` hcs WHERE hcs.complaint_id = hc.id ) AS totalCount, hc.limit_number as limitNumber,hc.remainder_number as remainderNumber, \n" +
-                "\thc.effective_end_date AS effectiveEndDate \n" +
+                "\thc.grant_start_date AS  effectiveStartDate,(SELECT COUNT( hcs.complaint_id ) AS totalCount FROM `hotel_coupon_status` hcs WHERE hcs.complaint_id = hc.id ) AS totalCount, hc.limit_number as limitNumber,hc.remainder_number as remainderNumber, \n" +
+                "\thc.grant_end_date AS effectiveEndDate \n" +
                 "FROM\n" +
                 "\t`hotel_coupon` hc     where hc.grant_start_date < :dateTime and hc.grant_end_date> :dateTime and hc.`status` = 1  ORDER BY hc.effective_start_date DESC limit :start,:rows";
 

+ 13 - 21
mhotel/src/com/happy/vo/CommentDetailsVo.java

@@ -45,33 +45,25 @@ public class CommentDetailsVo {
     //    ���۴���
     private int commentCount;
 
+    //    酒店图片
     private String coverImg;
 
-    //    酒店图片
+//    酒店id
+    private String hotelId;
+
+    public String getHotelId() {
+        return hotelId;
+    }
+
+    public void setHotelId(String hotelId) {
+        this.hotelId = hotelId;
+    }
+
     public String getCoverImg() {
         return coverImg;
     }
 
-    @Override
-    public String toString() {
-        return "CommentDetailsVo{" +
-                "id='" + id + '\'' +
-                ", userName='" + userName + '\'' +
-                ", headPhoto='" + headPhoto + '\'' +
-                ", score=" + score +
-                ", liveTime='" + liveTime + '\'' +
-                ", commentTime='" + commentTime + '\'' +
-                ", houseName='" + houseName + '\'' +
-                ", content='" + content + '\'' +
-                ", url=" + url +
-                ", hotelName='" + hotelName + '\'' +
-                ", hotelScore=" + hotelScore +
-                ", hotelTownship='" + hotelTownship + '\'' +
-                ", hotelType='" + hotelType + '\'' +
-                ", commentCount=" + commentCount +
-                ", coverImg='" + coverImg + '\'' +
-                '}';
-    }
+ 
 
     public void setCoverImg(String coverImg) {
         this.coverImg = coverImg;