|
@@ -166,9 +166,16 @@ public class AppHomePageAction extends ActionSupport implements ServletRequestAw
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Hotel hotel = hotelService.getById(Func.parseInt(hotelId));
|
|
Hotel hotel = hotelService.getById(Func.parseInt(hotelId));
|
|
|
|
|
+ if (hotel == null)
|
|
|
|
|
+ {
|
|
|
|
|
+ jsonObject.put(B.code, ResultStatusCode.BAD_REQUEST.getStatus());
|
|
|
|
|
+ jsonObject.put(B.message,"无法查询到当前酒店信息");
|
|
|
|
|
+ ResponseUtil.writeJson(ServletActionContext.getResponse(),jsonObject.toString());
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
jsonObject.put(B.code,ResultStatusCode.OK.getStatus());
|
|
jsonObject.put(B.code,ResultStatusCode.OK.getStatus());
|
|
|
- jsonObject.put(B.message,ResultUtil.ok(hotel));
|
|
|
|
|
|
|
+ jsonObject.put(B.data,hotel);
|
|
|
ResponseUtil.writeJson(ServletActionContext.getResponse(),jsonObject.toString());
|
|
ResponseUtil.writeJson(ServletActionContext.getResponse(),jsonObject.toString());
|
|
|
return null;
|
|
return null;
|
|
|
}
|
|
}
|