@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"; }
@RequestMapping("/dataGrid") @ResponseBody public Grid dataGrid(HttpServletRequest request, TransactionSearch search, PageFilter ph) { SessionInfo sessionInfo = (SessionInfo) request.getSession().getAttribute(GlobalConstant.SESSION_INFO); search.setRoleName(sessionInfo.getRoleNames()); search.setLoginUserId(sessionInfo.getId()); Grid grid = new Grid(); grid.setRows(oilSellService.dataGrid(search, ph)); grid.setTotal(oilSellService.count(search, ph)); return grid; }