diff --git a/ruoyi-front/src/main/java/com/ruoyi/front/domain/CommonProblem.java b/ruoyi-front/src/main/java/com/ruoyi/front/domain/CommonProblem.java index dc110efa9..632fb8f09 100644 --- a/ruoyi-front/src/main/java/com/ruoyi/front/domain/CommonProblem.java +++ b/ruoyi-front/src/main/java/com/ruoyi/front/domain/CommonProblem.java @@ -26,6 +26,10 @@ public class CommonProblem extends BaseEntity @Excel(name = "内容") private String content; + /** 内容 */ + @Excel(name = "解析") + private String explains; + /** 点击量 */ @Excel(name = "点击量") private Integer hits; @@ -79,6 +83,14 @@ public class CommonProblem extends BaseEntity return delFlag; } + public String getExplains() { + return explains; + } + + public void setExplains(String explains) { + this.explains = explains; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/ruoyi-front/src/main/resources/mapper/front/CommonProblemMapper.xml b/ruoyi-front/src/main/resources/mapper/front/CommonProblemMapper.xml index 65a81c14f..6bceeabfb 100644 --- a/ruoyi-front/src/main/resources/mapper/front/CommonProblemMapper.xml +++ b/ruoyi-front/src/main/resources/mapper/front/CommonProblemMapper.xml @@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -17,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, title, content, hits, del_flag, create_by, create_time, update_by, update_time from common_problem + select id, title, content, explains, hits, del_flag, create_by, create_time, update_by, update_time from common_problem
-
- +
+
- -
-
-
- -
- + +
diff --git a/ruoyi-front/src/main/resources/templates/front/problem/edit.html b/ruoyi-front/src/main/resources/templates/front/problem/edit.html index 5b25b3e51..65df32412 100644 --- a/ruoyi-front/src/main/resources/templates/front/problem/edit.html +++ b/ruoyi-front/src/main/resources/templates/front/problem/edit.html @@ -15,18 +15,25 @@
- +
-
+
+ +
+ +
+
+
+
diff --git a/ruoyi-front/src/main/resources/templates/front/problem/problem.html b/ruoyi-front/src/main/resources/templates/front/problem/problem.html index c91c98e47..175ec57f1 100644 --- a/ruoyi-front/src/main/resources/templates/front/problem/problem.html +++ b/ruoyi-front/src/main/resources/templates/front/problem/problem.html @@ -14,10 +14,10 @@ -
  • +
  •  搜索  重置 @@ -28,18 +28,18 @@
    @@ -74,18 +74,26 @@ }, { field: 'content', - title: '内容' + title: '问题描述' + }, + { + field: 'explains', + title: '解析' }, { field: 'hits', title: '点击量' }, + { + field: 'createTime', + title: '创建时间' + }, { title: '操作', align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('
    编辑 '); + actions.push('编辑 '); actions.push('删除'); return actions.join(''); } diff --git a/sql/business_20201010.sql b/sql/business_20201010.sql index 40bd0e93e..463ead208 100644 --- a/sql/business_20201010.sql +++ b/sql/business_20201010.sql @@ -191,7 +191,8 @@ drop table if exists common_problem; create table common_problem ( id bigint(20) not null auto_increment comment 'ID', title varchar(50) not null comment '标题', - content text not null comment '内容', + content text not null comment '问题描述内容', + explains text not null comment '内容', hits int (6) default 0 comment '点击量', del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)', create_by varchar(64) default '' comment '创建者',