raojiaolong@163.com 2 лет назад
Родитель
Сommit
5ed3cdb9b5

+ 20 - 0
mhotel/src/com/happy/Model/Booking.java

@@ -61,6 +61,10 @@ public class Booking {
 
   private String lockTime; // 锁定时间
 
+  private Integer hstatus;//酒店营业状态(1 营业 2.休息)
+
+  private Integer hotelStatus;//酒店状态(0删除 1正常,2冻结)
+
   private List<FileInfo> houseFileInfoList; // 房型详细图
   public Integer getId() {
     return id;
@@ -497,4 +501,20 @@ public class Booking {
   public void setStatus_del(int status_del) {
     this.status_del = status_del;
   }
+
+  public Integer getHstatus() {
+    return hstatus;
+  }
+
+  public void setHstatus(Integer hstatus) {
+    this.hstatus = hstatus;
+  }
+
+  public Integer getHotelStatus() {
+    return hotelStatus;
+  }
+
+  public void setHotelStatus(Integer hotelStatus) {
+    this.hotelStatus = hotelStatus;
+  }
 }

+ 1 - 1
mhotel/src/com/happy/action/AppBookingAction.java

@@ -857,7 +857,7 @@ public class AppBookingAction extends ActionSupport implements ServletRequestAwa
                 {
                     hotelName = book.getHouseName();
                 }
-                Message2.send(adminManager.getOpenid(),order_num,book.getHotelType(),live_end,book.getUserName(),hotelName, Func.parseStr(book.getId()));
+                Message2.send(adminManager.getOpenid(),order_num,hotelName,live_end,book.getUserName(),hotelName, Func.parseStr(book.getId()));
 
                 int m = bookService.updateBooking(book);
                 //用户支付,写入数据操作

+ 8 - 6
mhotel/src/com/happy/action/AppMePageAction.java

@@ -131,13 +131,15 @@ public class AppMePageAction extends ActionSupport implements ServletRequestAwar
 
         IPage<Booking> iPage = bookService.queryPage(querySql.toString(), page, rows);
         List<Booking> bookList =iPage.getPageList();
-        for (Booking book: bookList) {
-            if (book == null || Func.checkNull(book.getHouseId()))
-                continue;
+        if(bookList!=null){
+            for (Booking book: bookList) {
+                if (book == null || Func.checkNull(book.getHouseId()))
+                    continue;
 
-            // 将房间图片,写入房型对象中
-            List<FileInfo> fileInfoList = fileService.queryListByLinkId(book.getHouseId());
-            book.setHouseFileInfoList(fileInfoList);
+                // 将房间图片,写入房型对象中
+                List<FileInfo> fileInfoList = fileService.queryListByLinkId(book.getHouseId());
+                book.setHouseFileInfoList(fileInfoList);
+            }
         }
 
         ResponseUtil.writeJsonIPage(ServletActionContext.getResponse(),iPage);

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

@@ -221,7 +221,7 @@ public class BookImplDao implements BookDao {
         SqlUtil.filterKeyword(sqlx);
 
         int start = (page - 1) * rows;// 每页的起始下标
-        String sql = "SELECT a.*,b.name hotel_township_name FROM (select "+selectCol+" from booking) a left join hotel_dict b on a.hotel_township = b.id WHERE 1=1 "+sqlx+" ORDER BY create_time DESC limit :start,:rows ";
+        String sql = "SELECT a.*,b.name hotel_township_name,c.hstatus hstatus,c.status hotelStatus FROM (select "+selectCol+" from booking) a left join hotel_dict b on a.hotel_township = b.id left join hotel c on a.hotel_id = c.id WHERE 1=1 "+sqlx+" ORDER BY create_time DESC limit :start,:rows ";
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("start", start);
         sps.addValue("rows", rows);