diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/GenConstants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/GenConstants.java
index bf599e030..fdcca14cb 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/constant/GenConstants.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/GenConstants.java
@@ -80,6 +80,9 @@ public class GenConstants
/** 上传控件 */
public static final String HTML_UPLOAD = "upload";
+ /** 富文本控件 */
+ public static final String HTML_SUMMERNOTE = "summernote";
+
/** 字符串类型 */
public static final String TYPE_STRING = "String";
diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java
index c034905fe..736092752 100644
--- a/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java
+++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java
@@ -59,7 +59,7 @@ public class GenTableColumn extends BaseEntity
/** 查询方式(EQ等于、NE不等于、GT大于、LT小于、LIKE模糊、BETWEEN范围) */
private String queryType;
- /** 显示类型(input文本框、textarea文本域、select下拉框、checkbox复选框、radio单选框、datetime日期控件、upload上传控件) */
+ /** 显示类型(input文本框、textarea文本域、select下拉框、checkbox复选框、radio单选框、datetime日期控件、upload上传控件、summernote富文本控件) */
private String htmlType;
/** 字典类型 */
diff --git a/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java b/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java
index 89ea6af00..08e9c9a62 100644
--- a/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java
+++ b/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java
@@ -116,6 +116,11 @@ public class GenUtils
{
column.setHtmlType(GenConstants.HTML_UPLOAD);
}
+ // 内容字段设置富文本控件
+ else if (StringUtils.endsWithIgnoreCase(columnName, "content"))
+ {
+ column.setHtmlType(GenConstants.HTML_SUMMERNOTE);
+ }
}
/**
diff --git a/ruoyi-generator/src/main/resources/templates/tool/gen/edit.html b/ruoyi-generator/src/main/resources/templates/tool/gen/edit.html
index 4e7fb0962..d64973396 100644
--- a/ruoyi-generator/src/main/resources/templates/tool/gen/edit.html
+++ b/ruoyi-generator/src/main/resources/templates/tool/gen/edit.html
@@ -597,6 +597,7 @@
+
diff --git a/ruoyi-generator/src/main/resources/vm/html/add.html.vm b/ruoyi-generator/src/main/resources/vm/html/add.html.vm
index 684cf8eb5..62e85d366 100644
--- a/ruoyi-generator/src/main/resources/vm/html/add.html.vm
+++ b/ruoyi-generator/src/main/resources/vm/html/add.html.vm
@@ -14,6 +14,12 @@
#break
#end
#end
+#foreach($column in $columns)
+#if($column.insert && !$column.superColumn && !$column.pk && $column.htmlType == "summernote")
+