Пример #1
0
 @RequestMapping(value = "/user/myLend")
 public String lendLog(final HttpServletRequest request, final HttpServletResponse response) {
   UserInfo userInfo = getLoginUserInfo(cacheService, request, response);
   if (null == userInfo) {
     return "redirect:/user/index";
   }
   List<BookLogMessageVo> list = libraryService.getBookLogMessageVos(userInfo.getId());
   request.setAttribute("BookLogMessageVoList", list);
   request.setAttribute("userInfo", userInfo);
   return "myMessage.jsp";
 }
Пример #2
0
 @RequestMapping(value = "/user/myself")
 public String userInfo(final HttpServletRequest request, final HttpServletResponse response) {
   UserInfo userInfo = getLoginUserInfo(cacheService, request, response);
   if (null == userInfo) {
     return "redirect:/user/index";
   }
   List<UserLibraryVo> list = libraryService.getUserLibraryList(userInfo.getId());
   List<Book> bookList = libraryService.getBookList(userInfo.getId());
   request.setAttribute("userInfo", userInfo);
   request.setAttribute("libraryList", list);
   request.setAttribute("bookList", bookList);
   return "userInfo.jsp";
 }
Пример #3
0
 @RequestMapping(value = "/user/mylibrary")
 public String libraryBooks(final HttpServletRequest request, final HttpServletResponse response) {
   UserInfo userInfo = getLoginUserInfo(cacheService, request, response);
   int userId = 0;
   if (null != userInfo) {
     userId = userInfo.getId();
   }
   String query = "";
   if (request.getParameter("query") != null) {
     query = request.getParameter("query");
   }
   List<BookVo> bookList = libraryService.getLibraryBookList(userId, query);
   request.setAttribute("bookList", bookList);
   request.setAttribute("userInfo", userInfo);
   return "myLibrary.jsp";
 }