public String newnews() { HttpServletRequest request = getRequest(); String pageIndex = request.getParameter("page"); int pageSize = 10; PageInfo pageInfo = createPageInfo(); pageInfo.setPageSize(pageSize); if (pageIndex == null) { pageInfo.setPageIndex(1); } else { pageInfo.setPageIndex(Integer.parseInt(pageIndex)); } this.goodList = this.goodService.select(new Good()); this.advertiseList = this.advertiseService.getAdvertiseList(); Information inf = new Information(); inf.setType("0"); this.inforAllList = this.informationService.pageList(pageInfo, inf, true); if ((pageInfo.getCount() > 0) && (pageInfo.getCount() % pageSize != 0)) { pageInfo.setPageCount(pageInfo.getCount() / pageSize + 1); } else { pageInfo.setPageCount(pageInfo.getCount() / pageSize); } request.setAttribute("pageInfo", pageInfo); this.informationList = this.informationService.select(new Information()); return "newnews"; }
public String listAllNews() { HttpServletRequest request = getRequest(); String pageIndex = request.getParameter("page"); int pageSize = 10; PageInfo pageInfo = createPageInfo(); pageInfo.setPageSize(pageSize); this.goodList = this.goodService.select(new Good()); if (pageIndex == null) { pageInfo.setPageIndex(1); } else { pageInfo.setPageIndex(Integer.parseInt(pageIndex)); } try { if (this.information == null) { this.information = new Information(); } this.informationList = this.informationService.select(new Information()); this.information.setEcommunity("1"); this.inforAllList = this.informationService.pageList(pageInfo, this.information, true); } catch (Exception e) { e.printStackTrace(); } if ((pageInfo.getCount() > 0) && (pageInfo.getCount() % pageSize != 0)) { pageInfo.setPageCount(pageInfo.getCount() / pageSize + 1); } else { pageInfo.setPageCount(pageInfo.getCount() / pageSize); } request.setAttribute("pageInfo", pageInfo); return "listAllNews"; }
/* 49: */ /* 50: */ public String listJosn() /* 51: */ { /* 52: 65 */ logger.info("start list pay"); /* 53: 66 */ List<Pay> resultList = null; /* 54: 67 */ int totalRows = 0; /* 55: */ try /* 56: */ { /* 57: 70 */ PageInfo pageInfo = createPageInfo(); /* 58: 71 */ if (this.pay == null) { /* 59: 72 */ this.pay = new Pay(); /* 60: */ } /* 61: 74 */ resultList = this.payService.pageList(pageInfo, this.pay, true); /* 62: 75 */ totalRows = pageInfo.getCount(); /* 63: */ } /* 64: */ catch (Exception e) /* 65: */ { /* 66: 77 */ logger.error("error occur when list pay", e); /* 67: */ } /* 68: 80 */ if (resultList == null) { /* 69: 81 */ resultList = new ArrayList(); /* 70: */ } /* 71: 83 */ this.jsonMap = new HashMap(); /* 72: 84 */ this.jsonMap.put("total", Integer.valueOf(totalRows)); /* 73: 85 */ this.jsonMap.put("rows", resultList); /* 74: 86 */ return "success"; /* 75: */ }
public String listJson() { logger.info("start list all data!"); List<SysRole> resultList = null; int totalRows = 0; try { PageInfo pageInfo = createPageInfo(); resultList = this.sysRoleService.pageList(pageInfo, this.sysRole, true); totalRows = pageInfo.getCount(); } catch (Exception e) { logger.error("error occur when list data!", e); } if (resultList == null) { resultList = new ArrayList(); } this.jsonMap = new HashMap(); this.jsonMap.put("total", Integer.valueOf(totalRows)); this.jsonMap.put("rows", resultList); logger.info("finish list all data!"); return "success"; }