夏文涛 пре 2 година
родитељ
комит
f094d57917

+ 20 - 0
mhotel/src/com/happy/action/HouseNumberStatusAction.java

@@ -124,6 +124,26 @@ public class HouseNumberStatusAction extends BaseController implements ModelDriv
     public void modifyStatusBatch() {
         String postDataStr = GetHttpParam.getRequestPostData(request);
         HouseNumberStatusDto postDataObj = JSONObject.parseObject(postDataStr, HouseNumberStatusDto.class);
+        //2023-09-20 A-jax 参数判断
+        if(postDataObj.getHouseNumberIds() == null){
+            ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
+                put("message", "房间不能为空");
+                put("code", 500);
+            }}.toString());
+        }
+        if(postDataObj.getCreateId() == null){
+            ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
+                put("message", "关房类型不能为空");
+                put("code", 500);
+            }}.toString());
+        }
+        if(postDataObj.getSetDate() == null){
+            ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
+                put("message", "日期不能为空");
+                put("code", 500);
+            }}.toString());
+        }
+
         houseNumberStatusService.modifyStatusBatch(postDataObj);
         ResUtil.writeJson(ServletActionContext.getResponse(), new JSONObject() {{
             put("message", "请求成功");

+ 36 - 36
mhotel/src/com/happy/action/IDCAction.java

@@ -66,12 +66,12 @@ public class IDCAction extends ActionSupport implements ServletRequestAware {
     public String getBookStatusData(){
         JSONObject resultJson = new JSONObject();
         List<IDCBookStatusEto> list = idcService.getBookStatusData();
-        if (list == null) {
-            resultJson.put("message", "数据为空");
-            resultJson.put("code", 500);
-            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
-            return null;
-        }
+//        if (list == null) {
+//            resultJson.put("message", "数据为空");
+//            resultJson.put("code", 500);
+//            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+//            return null;
+//        }
         resultJson.put("message", "查询成功");
         resultJson.put("code", 200);
         resultJson.put("data", list);
@@ -86,12 +86,12 @@ public class IDCAction extends ActionSupport implements ServletRequestAware {
     public String getHotelData() {
         JSONObject resultJson = new JSONObject();
         List<IDCHotelEto> list = idcService.getHotelData();
-        if (list == null) {
-            resultJson.put("message", "数据为空");
-            resultJson.put("code", 500);
-            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
-            return null;
-        }
+//        if (list == null) {
+//            resultJson.put("message", "数据为空");
+//            resultJson.put("code", 500);
+//            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+//            return null;
+//        }
         resultJson.put("message", "查询成功");
         resultJson.put("code", 200);
         resultJson.put("data", list);
@@ -116,12 +116,12 @@ public class IDCAction extends ActionSupport implements ServletRequestAware {
             sqlx.append("AND DATE_FORMAT(pay_time,'%Y') = DATE_FORMAT(NOW(),'%Y')");
         }
         List<IDCRankEto> list = idcService.getRankBookNumData(sqlx.toString());
-        if (list == null) {
-            resultJson.put("message", "数据为空");
-            resultJson.put("code", 500);
-            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
-            return null;
-        }
+//        if (list == null) {
+//            resultJson.put("message", "数据为空");
+//            resultJson.put("code", 500);
+//            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+//            return null;
+//        }
         resultJson.put("message", "查询成功");
         resultJson.put("code", 200);
         resultJson.put("data", list);
@@ -146,12 +146,12 @@ public class IDCAction extends ActionSupport implements ServletRequestAware {
             sqlx.append("AND DATE_FORMAT(pay_time,'%Y') = DATE_FORMAT(NOW(),'%Y')");
         }
         List<IDCRankEto> list = idcService.getRankSalesAmountData(sqlx.toString());
-        if (list == null) {
-            resultJson.put("message", "数据为空");
-            resultJson.put("code", 500);
-            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
-            return null;
-        }
+//        if (list == null) {
+//            resultJson.put("message", "数据为空");
+//            resultJson.put("code", 500);
+//            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+//            return null;
+//        }
         resultJson.put("message", "查询成功");
         resultJson.put("code", 200);
         resultJson.put("data", list);
@@ -167,12 +167,12 @@ public class IDCAction extends ActionSupport implements ServletRequestAware {
         JSONObject resultJson = new JSONObject();
 
         IDCSum idcSum = idcService.getSumData();
-        if (idcSum == null) {
-            resultJson.put("message", "数据为空");
-            resultJson.put("code", 500);
-            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
-            return null;
-        }
+//        if (idcSum == null) {
+//            resultJson.put("message", "数据为空");
+//            resultJson.put("code", 500);
+//            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+//            return null;
+//        }
         resultJson.put("message", "查询成功");
         resultJson.put("code", 200);
         resultJson.put("data", idcSum);
@@ -192,12 +192,12 @@ public class IDCAction extends ActionSupport implements ServletRequestAware {
     {
         JSONObject resultJson = new JSONObject();
         UserVisits info = userVisitsDao.queryTodayUserVisits();
-        if (info == null) {
-            resultJson.put("message", "数据为空");
-            resultJson.put("code", 500);
-            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
-            return null;
-        }
+//        if (info == null) {
+//            resultJson.put("message", "数据为空");
+//            resultJson.put("code", 500);
+//            ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
+//            return null;
+//        }
 
         resultJson.put("message", "查询成功");
         resultJson.put("code", 200);

+ 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,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 ";
+        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 check_out_time DESC limit :start,:rows ";
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("start", start);
         sps.addValue("rows", rows);

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

@@ -57,7 +57,7 @@ public class BookingComplainImplDao implements BookingComplainDao {
     public List<BookingComplaintVo> queryPage(String sqlx, int page, int rows) {
         SqlUtil.filterKeyword(sqlx);
         int start = (page - 1) * rows;// 每页的起始下标
-        String sql = selectLeftSql + sqlx + "and a.status != 0"  +" ORDER BY createDate DESC limit :start,:rows ";
+        String sql = selectLeftSql + sqlx + "and a.status != 0"  +" ORDER BY a.create_date DESC limit :start,:rows ";
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("start", start);
         sps.addValue("rows", rows);

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

@@ -306,5 +306,5 @@ public class HotelImplDao implements HotelDao {
         stringBuffer.append(" modify_date=:modify_date ");
         sps.addValue("modify_date", UUIDUtil.getNewDate());
     }
-    
+
 }