| | |
| | | private ColumnMapper columnMapper = SpringContextHolder.getBean(ColumnMapper.class); |
| | | @Override |
| | | public void dataParser(AttrNode attrNode) { |
| | | // log.info("分页解析"); |
| | | log.info("分页解析"); |
| | | synchronized (this) { |
| | | Template.HAS_PAGING = true; |
| | | |
| | | String baseUrl = (String) attrNode.getSystemDataValue("baseUrl"); |
| | | |
| | | Long companyId = (Long) attrNode.getSystemDataValue("companyId"); |
| | | Pagination param = (Pagination) attrNode.getParam(); |
| | | |
| | | Object pageNum = attrNode.getSystemDataValue("page"); |
| | | if (pageNum != null) { |
| | | param.setPage(pageNum.toString()); |
| | | } |
| | | |
| | | Page<ArticleEntity> page = new Page<>(Integer.parseInt(param.getPage()), Integer.parseInt(param.getLimit())); |
| | | ArticleEntity article = new ArticleEntity(); |
| | |
| | | for (int i = startAndEnd[0]; i <= startAndEnd[1]; i++) { |
| | | PageChildData child = new PageChildData(); |
| | | child.setIndex(i); |
| | | if (pageNo == 1) { |
| | | if (i == 1) { |
| | | child.setPath(path + "/index.html"); |
| | | } else { |
| | | child.setPath(path + "/" + StrUtil.format(filename, i)); |