ソースを参照

修改返回信息

raojiaolong@163.com 2 年 前
コミット
77bbf2d245
1 ファイル変更8 行追加2 行削除
  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);
             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());
         return null;
     }