From a508775d5c69e61e605c8f00fc18e70279444869 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Mon, 11 Jul 2022 21:49:04 +0800 Subject: [PATCH] add companyCode --- src/main/java/com/xcong/farmer/cms/core/node/Template.java | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/xcong/farmer/cms/core/node/Template.java b/src/main/java/com/xcong/farmer/cms/core/node/Template.java index aef600e..6a7a49c 100644 --- a/src/main/java/com/xcong/farmer/cms/core/node/Template.java +++ b/src/main/java/com/xcong/farmer/cms/core/node/Template.java @@ -21,7 +21,7 @@ // 文件名称 private String name = "index"; // 文件保存路径 - private String path; + private String path = ""; private Document document; private Map<String, Map<String, Object>> params = new HashMap<>(); @@ -31,7 +31,7 @@ // 页面中包含的标签 public static Set<String> TAGS; - public static boolean HAS_PAGING = false; + public volatile static boolean HAS_PAGING = false; public Template() { TAGS = new HashSet<>(); @@ -63,7 +63,7 @@ if ("article".equals(templateType)) { Object templateName = system.get("templateName"); if (templateName != null) { - this.name = (String) templateName; + this.name = String.valueOf(templateName); } } else if ("column".equals(templateType)) { Object page = system.get("page"); @@ -77,7 +77,7 @@ } public void parser() { - Elements children = document.body().children(); + Elements children = document.children(); if (CollUtil.isNotEmpty(children)) { for (Element child : children) { PartNode partNode = new PartNode(child, this.system); @@ -96,8 +96,8 @@ for (PartNode partNode : partNodes) { sb.append(partNode.getHtml()); } - document.body().empty().html(sb.toString()); - String outPath = path(outputPath); + document = Jsoup.parse(sb.toString()); + String outPath = path(outputPath) + system.get("companyCode"); String html = document.html(); try { -- Gitblit v1.9.1