| | |
| | | public class PageDataParserHandler implements DataParserHandler { |
| | | |
| | | private ArticleMapper articleMapper = SpringContextHolder.getBean(ArticleMapper.class); |
| | | private CmsProperties cmsProperties = SpringContextHolder.getBean(CmsProperties.class); |
| | | @Override |
| | | public void dataParser(AttrNode attrNode) { |
| | | 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(); |
| | |
| | | pageData.setTotalCnt((int) pageList.getSize()); |
| | | |
| | | if (CollUtil.isNotEmpty(pageList.getRecords())) { |
| | | String path = cmsProperties.getBaseUrl() + "/" + param.getCode(); |
| | | String path = baseUrl + "/" + param.getCode(); |
| | | String filename = "index_{}.html"; |
| | | |
| | | List<PageChildData> list = new ArrayList<>(); |