Browse Source

Merge remote-tracking branch 'origin/master'

Administrator 2 years ago
parent
commit
4ea1cab686
1 changed files with 8 additions and 2 deletions
  1. 8 2
      mhotel/src/com/happy/action/hotelAction.java

+ 8 - 2
mhotel/src/com/happy/action/hotelAction.java

@@ -175,8 +175,14 @@ public class hotelAction extends ActionSupport implements ServletRequestAware {
             resultJson.put("data", hotelEto);
             resultJson.put("data", hotelEto);
             ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
             ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
         }
         }
-        resultJson.put("message", "未查到数据");
-        resultJson.put("code", 500);
+        if(adminManager == null && hotel == null){
+            resultJson.put("message", "未查到数据请检查参数");
+            resultJson.put("code", 500);
+            resultJson.put("data", hotelEto);
+        }
+        resultJson.put("message", "查询成功");
+        resultJson.put("code", 200);
+        resultJson.put("data", hotelEto);
         ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
         ResUtil.writeJson(ServletActionContext.getResponse(), resultJson.toString());
         return null;
         return null;
     }
     }