From 3a8d8b6de6daf6e7198a2b8d562dc2fbf49a4a2a Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 12 Jul 2022 11:47:45 +0800
Subject: [PATCH] Merge branch 'master' of http://120.27.238.55:7000/r/farmer-cms
---
src/main/java/com/xcong/farmer/cms/core/node/Template.java | 24 ++++++++++++++++++------
1 files changed, 18 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 78e6476..ab9b54e 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
@@ -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,15 +63,27 @@
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");
if (!new Integer(1).equals(page)) {
this.name = name + "_" + page;
}
- } else {
-
+ } else if ("search".equals(templateType)){
+ Object templateName = system.get("templateName");
+ if (templateName != null) {
+ this.name = String.valueOf(templateName);
+ } else {
+ this.name = "search";
+ }
+ } else if ("message".equals(templateType)) {
+ Object templateName = system.get("templateName");
+ if (templateName != null) {
+ this.name = String.valueOf(templateName);
+ } else {
+ this.name = "message";
+ }
}
}
@@ -97,7 +109,7 @@
sb.append(partNode.getHtml());
}
document = Jsoup.parse(sb.toString());
- String outPath = path(outputPath);
+ String outPath = path(outputPath) + system.get("companyCode");
String html = document.html();
try {
@@ -107,7 +119,7 @@
file.mkdirs();
}
- FileOutputStream outputStream = new FileOutputStream(path +this.name + suffix);
+ FileOutputStream outputStream = new FileOutputStream(path + this.name + suffix);
outputStream.write(html.getBytes());
outputStream.close();
} catch (IOException e) {
--
Gitblit v1.9.1