소스 검색

修改返回信息

raojiaolong@163.com 3 년 전
부모
커밋
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);
             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;
     }
     }