/**
   * 分页获取最新求译列表 登录后文档首页的转发
   *
   * @param session
   * @param model
   * @param paraPage
   * @return
   */
  @RequestMapping(params = "method=index", method = RequestMethod.GET)
  public String index(HttpSession session, Model model, Pager<Document> paraPage) {
    User user = (User) session.getAttribute("user");
    if (paraPage == null) paraPage = new Pager<Document>();
    if (user != null) {
      int totleCount = documentService.getAllCount();
      Pager<Document> page =
          new Pager<Document>(totleCount, paraPage.getCurPage(), paraPage.getCountPerPage());
      List<Document> documentList =
          documentService.getByPage(page.getStartCount(), page.getCountPerPage());
      page.settList(documentList);

      model.addAttribute("hotDocList", getHotDoc());
      model.addAttribute("hotComList", getHotCom());

      model.addAttribute("user", user);
      model.addAttribute("page", page);
      return "user/index";
    }
    return "error";
  }
  /**
   * vo分页获取文档列表
   *
   * @param session
   * @param model
   * @param curPage
   * @param countPerPage
   * @return
   */
  @RequestMapping(params = "method=list", method = RequestMethod.GET)
  public String list(HttpSession session, Model model, Pager<Document> paraPage, String target) {
    User user = (User) session.getAttribute("user");

    // 默认情况
    if (paraPage == null) {
      paraPage = new Pager<Document>();
    }
    if (user != null) {
      int totleCount = documentService.getAllCount(user.getUserid());

      Pager<Document> page =
          new Pager<Document>(totleCount, paraPage.getCurPage(), paraPage.getCountPerPage());

      List<Document> documentList =
          documentService.getByPage(page.getStartCount(), page.getCountPerPage(), user.getUserid());
      page.settList(documentList);
      model.addAttribute("user", user);
      model.addAttribute("page", page);
      model.addAttribute("target", target);
      return "user/vo_index";
    } else return "error";
  }