From 2e6277a8cf7a1d78b5151ac42f1aa785205cc907 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Thu, 07 Jul 2022 14:18:52 +0800
Subject: [PATCH] finish index
---
src/main/java/com/xcong/farmer/cms/modules/core/service/impl/CmsCoreServiceImpl.java | 27 +++++++++++++++++++++------
1 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/xcong/farmer/cms/modules/core/service/impl/CmsCoreServiceImpl.java b/src/main/java/com/xcong/farmer/cms/modules/core/service/impl/CmsCoreServiceImpl.java
index 5a2579b..475c74d 100644
--- a/src/main/java/com/xcong/farmer/cms/modules/core/service/impl/CmsCoreServiceImpl.java
+++ b/src/main/java/com/xcong/farmer/cms/modules/core/service/impl/CmsCoreServiceImpl.java
@@ -7,6 +7,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import javax.validation.constraints.NotNull;
import java.util.HashMap;
import java.util.Map;
@@ -22,23 +23,37 @@
private TemplateConfiguration cfg;
@Override
- public void articleProcess(Long id, String templateName) {
+ public void articleProcess(Long id, String templateName, String templatePath) {
Map<String, Object> data = new HashMap<>();
data.put("id", id);
-
+ data.put("companyId", 23L);
+ data.put("templateType", "article");
+ data.put("templatePath", templatePath);
+ data.put("templateName", id);
if (StrUtil.isEmpty(templateName)) {
- templateName = "artile.defualt.html";
+ templateName = "defualt.artile.html";
}
cfg.process(data, templateName);
}
@Override
- public void columnProcess(String code, String templateName, boolean article) {
-
+ public void columnProcess(Map<String, Object> data, String templateName, boolean article) {
+ data.put("companyId", 23L);
+ data.put("templateType", "column");
+ data.put("page", 1);
+ if (StrUtil.isEmpty(templateName)) {
+ templateName = "defualt.list.html";
+ }
+ cfg.process(data, templateName);
}
@Override
- public void columnProcess(Long id, String templateName, boolean article) {
+ public void indexProcess(@NotNull Map<String, Object> data, String templateName) {
+ if (StrUtil.isEmpty(templateName)) {
+ templateName = "index.html";
+ }
+ data.put("companyId", 23L);
+ cfg.process(data, templateName);
}
}
--
Gitblit v1.9.1