public String getPayContext(@RequestParam(value = “page”, defaultValue = “1”) Integer page,
@RequestParam(value = “rows”, defaultValue = “10”) Integer rows, String fromSystem,
HttpSession session, HttpServletRequest request, HttpServletResponse response, Model model) throws IOException {
Map<String, Object> map = new HashMap<String, Object>();
map.put(“startIndex”, (page – 1) * rows);
map.put(“endIndex”, rows);
model.addAttribute(“page”, page);
model.addAttribute(“rows”, rows);
SystemFrom sf = systemFromService.getSystemFrom();
if (sf == null) {
PrintWriter writer = response.getWriter();
writer.println(“<script>alert(‘当前用户未签约’)”+ “</script>”);
writer.println(“<script>window.history.go(-1);</script>”);
writer.flush();
writer.close();
return null;
}
model.addAttribute(“currPage”, page);
model.addAttribute(“totalPage”, totalPage1);
return “context”; //跳转页面context.jsp
}