Browse Source

评价列表接口新增参数,新增房价列表参数校验

lijie 2 years ago
parent
commit
d4ba107527

+ 2 - 0
mhotel/src/com/happy/Model/BookingComment.java

@@ -71,6 +71,8 @@ public class BookingComment {
 
 
     //    状态(0删除 1正常)
     //    状态(0删除 1正常)
     private String status;
     private String status;
+    //退房时间
+    private String checkOutTime;
 
 
     //    下级评论回复
     //    下级评论回复
     private List<BookingComment> lowCommentList;
     private List<BookingComment> lowCommentList;

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

@@ -1,8 +1,6 @@
 package com.happy.action;
 package com.happy.action;
 
 
-import com.happy.Model.AdminManager;
-import com.happy.Model.Booking;
-import com.happy.Model.BookingLog;
+import com.happy.Model.*;
 import com.happy.Model.weixin.PayResult;
 import com.happy.Model.weixin.PayResult;
 import com.happy.Model.weixin.Users;
 import com.happy.Model.weixin.Users;
 import com.happy.Model.weixin.WechatUnifiedOrder;
 import com.happy.Model.weixin.WechatUnifiedOrder;

+ 24 - 0
mhotel/src/com/happy/action/HousePriceAction.java

@@ -123,6 +123,30 @@ public class HousePriceAction extends BaseController implements ModelDriven<Hous
      * 表格数据 房态管理-房价管理
      * 表格数据 房态管理-房价管理
      */
      */
     public void queryPage() {
     public void queryPage() {
+        if(housePriceDto.getSetDate() == null){
+            ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
+                put("message", "参数不能为空!");
+                put("code", 500);
+            }}.toString());
+        }
+        if(housePriceDto.getManagerId() == null){
+            ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
+                put("message", "参数不能为空!");
+                put("code", 500);
+            }}.toString());
+        }
+        if(page == null){
+            ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
+                put("message", "参数不能为空!");
+                put("code", 500);
+            }}.toString());
+        }
+        if(rows == null){
+            ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
+                put("message", "参数不能为空!");
+                put("code", 500);
+            }}.toString());
+        }
         ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
         ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
             put("message", "请求成功");
             put("message", "请求成功");
             put("code", 200);
             put("code", 200);

+ 44 - 4
mhotel/src/com/happy/action/hotelAction.java

@@ -20,9 +20,7 @@ import org.springframework.beans.BeanUtils;
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
+import java.util.*;
 
 
 public class hotelAction extends ActionSupport implements ServletRequestAware {
 public class hotelAction extends ActionSupport implements ServletRequestAware {
 
 
@@ -499,5 +497,47 @@ public class hotelAction extends ActionSupport implements ServletRequestAware {
      * 描述查询根据状态11的字典
      * 描述查询根据状态11的字典
      */
      */
 
 
-
+    public String queryTakeOrderDict(){
+        JSONObject resultJson = new JSONObject();
+        StringBuilder s1 = new StringBuilder("");
+        s1.append("and code = 11");
+        List<HotelDict> list1 = hotelDictService.queryList(s1.toString());
+        List<Map<String,String>> data = new ArrayList<>();
+        list1.forEach(hotelDict -> {
+            switch (hotelDict.getId()){
+                case 1000011001 : {
+                    Map<String,String> map = new HashMap<>();
+                    map.put("id", String.valueOf(hotelDict.getId()));
+                    map.put("code",hotelDict.getName());
+                    map.put("description","为多少分钟后接单");
+                    data.add(map);
+                } break;
+                case 1000011002 : {
+                    Map<String,String> map = new HashMap<>();
+                    map.put("id", String.valueOf(hotelDict.getId()));
+                    map.put("code",hotelDict.getName());
+                    map.put("description","1.接单 2.拒单");
+                    data.add(map);
+                } break;
+                case 1000011003 : {
+                    Map<String,String> map = new HashMap<>();
+                    map.put("id", String.valueOf(hotelDict.getId()));
+                    map.put("code",hotelDict.getName());
+                    map.put("description","可预定多少月内的");
+                    data.add(map);
+                } break;
+            }
+        });
+        if (data.size()>0){
+            resultJson.put("message", "查询成功");
+            resultJson.put("code", 200);
+            resultJson.put("date1", data);
+            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+        }else {
+            resultJson.put("message", "数据为空!");
+            resultJson.put("code", 205);
+            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+        }
+        return null;
+    }
 }
 }

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

@@ -34,7 +34,7 @@ public class BookingCommentImplDao implements BookingCommentDao {
 
 
     private String selectSql = "select " +
     private String selectSql = "select " +
             "a.id,a.comment_id,a.comment_parent_id,a.comment_name,a.booking_id,a.hotel_id,a.house_id,a.content,a.comment_status,a.score,a.score_ws," +
             "a.id,a.comment_id,a.comment_parent_id,a.comment_name,a.booking_id,a.hotel_id,a.house_id,a.content,a.comment_status,a.score,a.score_ws," +
-            "a.score_fw,a.score_ss,a.score_wz,a.create_id,a.create_username,a.create_date,a.modify_date,a.status,b.check_out_time,c.user_name as createName,b.hotel_manager_id" +
+            "a.score_fw,a.score_ss,a.score_wz,a.create_id,a.create_username,a.create_date,a.modify_date,a.status,b.check_out_time as checkOutTime,c.user_name as createName,b.hotel_manager_id" +
             " from booking_comment a" +
             " from booking_comment a" +
             " left join booking b on b.id = a.booking_id" +
             " left join booking b on b.id = a.booking_id" +
             " left join users c on c.id = a.create_id" +
             " left join users c on c.id = a.create_id" +