Exemplo n.º 1
0
 /**
  * @author zhang.jie 页面跳转-酒店详情
  * @param request
  * @return 2015-9-21
  */
 @PolicyJournal(accessLevel = AccessLevel.PRIVATE)
 @RequestMapping("/to_hotelRoomdetail_dialog")
 public ModelAndView to_hotelRoomdetail_dialog(HttpServletRequest request, String id) {
   ModelAndView mav = new ModelAndView("/hotelroom/to_roomDetail_dialog");
   // 根据id查询酒店客房信息
   Map<String, Object> map = this.hotelRoomService.selectHotelRoomByPk(id);
   // 根据客房id查询产品
   HotelRoomPlanBo hotelRoomPlan = new HotelRoomPlanBo();
   hotelRoomPlan.setRoomId(id);
   hotelRoomPlan.setStatus("1");
   List<Map<String, Object>> list =
       this.hotelRoomPlanService.selectHotelRoomPlanByExample(hotelRoomPlan);
   mav.addObject("list", list);
   mav.addObject("map", map);
   return mav;
 }
Exemplo n.º 2
0
  /**
   * @author zhang.jie 页面跳转-酒店详情修改页面
   * @param request
   * @return 2015-9-21
   */
  @PolicyJournal(accessLevel = AccessLevel.PRIVATE)
  @RequestMapping("/to_roomedit_dialog")
  public ModelAndView to_roomedit_dialog(HttpServletRequest request, String id) {
    String agentId = null;
    // 非商户
    String isAgent = "0";
    LoginUser user = LoginSessionUtil.getSystemSession(request);
    if (user.getAgentId() != null) {
      agentId = user.getAgentId().toString();
      // 商户
      isAgent = "1";
    }
    Page<List<Map<String, Object>>> page = Page.getPage(request);
    List<Map<String, Object>> list1 = hotelRoomService.selectHotelNameByagentId(agentId);
    ModelAndView mav = null;
    if (isAgent.equals("0")) {
      mav = new ModelAndView("/hotelroom/to_room_edit_admin");
    } else if (isAgent.equals("1")) {
      mav = new ModelAndView("/hotelroom/to_room_edit");
    }

    // 根据id查询酒店客房信息
    Map<String, Object> map = this.hotelRoomService.selectHotelRoomByPk(id);
    // 根据客房id查询产品
    HotelRoomPlanBo hotelRoomPlan = new HotelRoomPlanBo();
    hotelRoomPlan.setRoomId(id);
    hotelRoomPlan.setStatus("1");
    List<Map<String, Object>> list =
        this.hotelRoomPlanService.selectHotelRoomPlanByExample(hotelRoomPlan);
    mav.addObject("list", list);
    mav.addObject("planSize", list.size());
    mav.addObject("map", map);
    mav.addObject("list1", list1);
    mav.addObject("isAgent", isAgent);
    return mav;
  }