From 5b0e46daf5066c9d65ab830b5eb57bb4b6c23abd Mon Sep 17 00:00:00 2001 From: ronger Date: Thu, 29 Apr 2021 10:20:42 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E7=BB=9F=E4=B8=80=E8=A1=A8=E5=91=BD?= =?UTF-8?q?=E5=90=8D,=E4=BB=A5=20forest=20=E5=BC=80=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../java/com/rymcu/forest/lucene/model/UserDic.java | 2 +- src/main/java/mapper/lucene/ArticleLuceneMapper.xml | 11 ++--------- src/main/java/mapper/lucene/UserDicMapper.xml | 10 +++++----- src/main/resources/static/forest.sql | 6 +++--- 5 files changed, 12 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml index 19eadc8..a4b7411 100644 --- a/pom.xml +++ b/pom.xml @@ -254,7 +254,7 @@ spring-boot-maven-plugin - vertical-console + forest diff --git a/src/main/java/com/rymcu/forest/lucene/model/UserDic.java b/src/main/java/com/rymcu/forest/lucene/model/UserDic.java index 04dabf3..27aae52 100644 --- a/src/main/java/com/rymcu/forest/lucene/model/UserDic.java +++ b/src/main/java/com/rymcu/forest/lucene/model/UserDic.java @@ -13,7 +13,7 @@ import javax.persistence.Table; * @date 2021/2/4 09:09 */ @Data -@Table(name = "lucene_user_dic") +@Table(name = "forest_lucene_user_dic") public class UserDic { /** 主键 */ @Id diff --git a/src/main/java/mapper/lucene/ArticleLuceneMapper.xml b/src/main/java/mapper/lucene/ArticleLuceneMapper.xml index 895c45a..0de8d20 100755 --- a/src/main/java/mapper/lucene/ArticleLuceneMapper.xml +++ b/src/main/java/mapper/lucene/ArticleLuceneMapper.xml @@ -31,17 +31,10 @@ - - id - , article_title - - - article_content - select art.id, art.article_title, content.article_content from forest_article art - left join forest_article_content content on art.id = content.id_article + join forest_article_content content on art.id = content.id_article where id = #{id}; diff --git a/src/main/java/mapper/lucene/UserDicMapper.xml b/src/main/java/mapper/lucene/UserDicMapper.xml index 536f4c0..c583ebd 100755 --- a/src/main/java/mapper/lucene/UserDicMapper.xml +++ b/src/main/java/mapper/lucene/UserDicMapper.xml @@ -4,26 +4,26 @@ - insert into lucene_user_dic(dic) value (#{dic}) + insert into forest_lucene_user_dic(dic) value (#{dic}) delete - from lucene_user_dic + from forest_lucene_user_dic where id = (#{id}) - update lucene_user_dic + update forest_lucene_user_dic set dic=#{dic} where id = (#{id}) diff --git a/src/main/resources/static/forest.sql b/src/main/resources/static/forest.sql index 61061bf..3970dee 100644 --- a/src/main/resources/static/forest.sql +++ b/src/main/resources/static/forest.sql @@ -340,16 +340,16 @@ create table forest_visit ) comment '浏览表' collate = utf8mb4_unicode_ci; -create table lucene_user_dic +create table forest_lucene_user_dic ( id int auto_increment comment '字典编号', dic char(32) null comment '字典', - constraint lucene_user_dic_id_uindex + constraint forest_lucene_user_dic_id_uindex unique (id) ) comment '用户扩展字典'; -alter table lucene_user_dic +alter table forest_lucene_user_dic add primary key (id); insert into forest.forest_role (id, name, input_code, status, created_time, updated_time, weights) values (1, '管理员', 'admin', '0', '2019-11-16 04:22:45', '2019-11-16 04:22:45', 1);