Beispiel #1
0
 @RequestMapping(value = "/tab/{tab}")
 public String queryTab(ModelMap modelMap, @PathVariable String tab, HttpSession session) {
   User user = (User) session.getAttribute(CommonUtil.USER_CONTEXT);
   Map map = new HashMap();
   map.put("start", 0);
   map.put("step", 30);
   map.put("sort", tab);
   map.put("loginuserid", user.getUserid());
   List<Doc> list = docService.queryDoc(map);
   modelMap.put("doclist", list);
   modelMap.put("tab", tab);
   return "doclist";
 }
Beispiel #2
0
  @RequestMapping(method = RequestMethod.GET)
  public String load(ModelMap modelMap, HttpSession session) {
    User user = (User) session.getAttribute(CommonUtil.USER_CONTEXT);
    Map map = new HashMap();
    map.put("start", 0);
    map.put("step", 30);
    map.put("loginuserid", user.getUserid());

    List<Doc> list = docService.queryDoc(map);
    modelMap.put("doclist", list);
    modelMap.put("tab", "newest");
    return "doclist";
  }
Beispiel #3
0
  @RequestMapping(value = "/tab/{tab}/page/{start}/{step}")
  @ResponseBody
  public List queryTabPage(
      @PathVariable String tab,
      @PathVariable int start,
      @PathVariable int step,
      HttpSession session) {
    User user = (User) session.getAttribute(CommonUtil.USER_CONTEXT);
    Map map = new HashMap();
    map.put("start", start);
    map.put("step", step);
    map.put("sort", tab);
    map.put("loginuserid", user.getUserid());
    List<Doc> list = docService.queryDoc(map);

    return list;
  }