@RequestMapping("/loadClient") @ResponseBody public JSONObject loadClient(HttpServletRequest request) { final String clientId = request.getParameter("clientId").substring(1); final JsonClient simpleClient = clientService.getClientSimpleInfo(Long.valueOf(clientId)); request.getSession().setAttribute("oldLevel", simpleClient.getLevel()); return JSONObject.fromObject(simpleClient); }
@RequestMapping("/addPage") public String addPage(HttpServletRequest request) { SessionInfo sessionInfo = (SessionInfo) request.getSession().getAttribute(GlobalConstant.SESSION_INFO); if (sessionInfo.getRoleNames().equals("client")) { JsonClient client = clientService.getClientSimpleInfo(sessionInfo.getId()); request.setAttribute("client", client); request.getSession().setAttribute("oldLevel", client.getLevel()); } return "/oil/sellAdd"; }