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 |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 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 331ebe6..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,10 +23,13 @@
     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 = "defualt.artile.html";
         }
@@ -35,9 +39,21 @@
     @Override
     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 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