refList();
+//
+// ClassroomListVO getCourseById(Long id);
+//
+// boolean saveCourse(ClassroomSaveDTO saveDTO);
+//
+// boolean updateCourseById(Long id, ClassroomSaveDTO saveDTO);
+//
+// boolean updateCourseEnableStateById(Long id, Integer enableState);
+//}
diff --git a/ruoyi-site/ruoyi-tpl/src/main/java/com/lizhw/tpl/module/docx/ttt/Main.java b/ruoyi-site/ruoyi-tpl/src/main/java/com/lizhw/tpl/module/docx/ttt/Main.java
new file mode 100644
index 000000000..9e3847a22
--- /dev/null
+++ b/ruoyi-site/ruoyi-tpl/src/main/java/com/lizhw/tpl/module/docx/ttt/Main.java
@@ -0,0 +1,24 @@
+package com.lizhw.tpl.module.docx.ttt;
+
+/**
+ * 基于Apache POI开的快速模板填充生成word,excel文档工具
+ * by miracleren@gmail.com
+ */
+
+public class Main {
+
+ public static void main(String[] args) {
+ System.out.println(" _ _ _ _____ ");
+ System.out.println("| \\ | (_) | __ \\ ");
+ System.out.println("| \\| |_ ___ ___| | | | ___ ___ ");
+ System.out.println("| . ` | |/ __/ _ \\ | | |/ _ \\ / __|");
+ System.out.println("| |\\ | | (_| __/ |__| | (_) | (__ ");
+ System.out.println("|_| \\_|_|\\___\\___|_____/ \\___/ \\___|");
+
+ //测试示例模板生成word
+ TestTemplate.buildTestDocx();
+
+ //测试示例模板生成xlsx
+ TestTemplate.buildTestXlsx();
+ }
+}
diff --git a/ruoyi-site/ruoyi-tpl/src/main/java/com/lizhw/tpl/module/docx/ttt/NiceDoc.java b/ruoyi-site/ruoyi-tpl/src/main/java/com/lizhw/tpl/module/docx/ttt/NiceDoc.java
new file mode 100644
index 000000000..4e330349a
--- /dev/null
+++ b/ruoyi-site/ruoyi-tpl/src/main/java/com/lizhw/tpl/module/docx/ttt/NiceDoc.java
@@ -0,0 +1,554 @@
+package com.lizhw.tpl.module.docx.ttt;
+
+import org.apache.poi.poifs.crypt.HashAlgorithm;
+import org.apache.poi.util.Units;
+import org.apache.poi.xwpf.usermodel.*;
+import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTRow;
+
+import javax.imageio.ImageIO;
+import java.awt.image.BufferedImage;
+import java.io.*;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.regex.Matcher;
+
+/**
+ * 基于模板快速生成word文档
+ * 目前只支持docx文件
+ *
+ * by miracleren@gmail.com
+ */
+
+public class NiceDoc {
+ //private HWPFDocument doc;
+ private XWPFDocument docx;
+ private int status = 0;
+ private final List allTables = new ArrayList<>();
+
+ /**
+ * 根据路径初始化word模板
+ *
+ * @param path
+ */
+ public NiceDoc(String path) {
+ if (!path.endsWith(".docx")) System.out.println("无效文档后缀,当前只支持docx格式word文档模板。");
+
+ FileInputStream in;
+ try {
+ in = new FileInputStream(path);
+ docx = new XWPFDocument(in);
+
+ //遍历段落生加载表格列表
+ this.allTables.addAll(docx.getTables());
+ pushLabels(new HashMap<>());
+ status = 1;
+ } catch (Exception e) {
+ e.printStackTrace();
+ } finally {
+ if (docx == null) docx = new XWPFDocument();
+ }
+ }
+
+ /**
+ * 往模板填充标签值
+ * {{labelName}}
+ *
+ * @param labels 标签值
+ * @return
+ */
+ public void pushLabels(Map labels) {
+ //遍历普通段落内容对像,填充标签值
+ List paragraphs = docx.getParagraphs();
+ replaceLabelsInParagraphs(paragraphs, labels);
+
+ //遍历表格内容,并填充标签值
+ List tables = status == 0 ? docx.getTables() : this.allTables;
+ for (XWPFTable table : tables) {
+ //表格行
+ List rows = table.getRows();
+ for (XWPFTableRow row : rows) {
+ //表格单元格
+ List cells = row.getTableCells();
+ for (XWPFTableCell cell : cells) {
+ //表格段落
+ List cellParagraphs = cell.getParagraphs();
+ replaceLabelsInParagraphs(cellParagraphs, labels);
+ }
+ }
+ }
+
+ //页眉标签值填充
+ List headers = docx.getHeaderList();
+ for (XWPFHeader header : headers) {
+ List headerParagraphs = header.getListParagraph();
+ replaceLabelsInParagraphs(headerParagraphs, labels);
+ }
+
+ //页脚填充
+ List footers = docx.getFooterList();
+ for (XWPFFooter footer : footers) {
+ List footerParagraphs = footer.getListParagraph();
+ replaceLabelsInParagraphs(footerParagraphs, labels);
+ }
+ }
+
+ /**
+ * 往模板填充标签值实体类
+ *
+ * @param entity
+ */
+ public void pushLabels(Object entity) {
+ pushLabels(NiceUtils.entityToMap(entity));
+ }
+
+
+ /**
+ * 填充表格内容到文档
+ * {{tableName:colName}}
+ *
+ * @param tableName
+ * @param list
+ */
+ public void pushTable(String tableName, List