Esempio n. 1
0
  @RequestMapping(value = "/company_line/{id}.htm")
  public ModelAndView line(
      @PathVariable("id") Long id,
      ModelAndView mav,
      Integer page,
      Integer pagesize,
      TravelLineQuery query) {
    TravelLineQuery.parse(query, null, null, page, pagesize, LineTemplateEnum.Line.getValue());
    query.setcId(id);

    PaginationList<TravelLineDO> list = lineService.listPagination(query, new DefaultIpageUrl());
    List<TravelLineVO> lists = BeanUtils.convert(TravelLineVO.class, list);

    mav.addObject("list", lists);
    mav.addObject("pagination", list.getQuery());
    mav.setViewName("cms/1409/line");
    return mav;
  }
 /**
  * 模板显示list
  *
  * @param mv
  * @param query
  * @param page
  * @param pagesize
  * @return
  */
 @RequestMapping(value = "/templatepage.htm")
 public ModelAndView template(
     ModelAndView mv, TravelLineQuery query, Integer page, Integer pagesize) {
   if (query.getzId() != null) {
     query.setzIds(query.getzId());
   }
   query.setlTemplateState(1);
   query.setcId(WebUserTools.getCid());
   query.setPageSize(Argument.isNotPositive(pagesize) ? 15 : pagesize);
   query.setNowPageIndex(Argument.isNotPositive(page) ? 0 : page - 1);
   // 查询线路模板
   PaginationList<TravelLineDO> list = lineService.listPagination(query, new DefaultIpageUrl());
   List<TravelLineVO> lists = BeanUtils.convert(TravelLineVO.class, list);
   mv.addObject("pagination", list.getQuery());
   mv.addObject("template", lists);
   mv.setViewName("account/line/templatepage");
   return mv;
 }