🎨 统一表命名,以 forest 开头

This commit is contained in:
ronger 2021-04-29 10:20:42 +08:00
parent 8e6707f7fd
commit 5b0e46daf5
5 changed files with 12 additions and 19 deletions

View File

@ -254,7 +254,7 @@
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>spring-boot-maven-plugin</artifactId>
</plugin> </plugin>
</plugins> </plugins>
<finalName>vertical-console</finalName> <finalName>forest</finalName>
</build> </build>
</project> </project>

View File

@ -13,7 +13,7 @@ import javax.persistence.Table;
* @date 2021/2/4 09:09 * @date 2021/2/4 09:09
*/ */
@Data @Data
@Table(name = "lucene_user_dic") @Table(name = "forest_lucene_user_dic")
public class UserDic { public class UserDic {
/** 主键 */ /** 主键 */
@Id @Id

View File

@ -31,17 +31,10 @@
<result column="article_thumbs_up_count" property="articleThumbsUpCount"></result> <result column="article_thumbs_up_count" property="articleThumbsUpCount"></result>
<result column="article_sponsor_count" property="articleSponsorCount"></result> <result column="article_sponsor_count" property="articleSponsorCount"></result>
</resultMap> </resultMap>
<sql id="Base_Column_List">
id
, article_title
</sql>
<sql id="Blob_Column_List">
article_content
</sql>
<select id="getAllArticleLucene" resultMap="ResultMapWithBLOBs"> <select id="getAllArticleLucene" resultMap="ResultMapWithBLOBs">
select art.id, art.article_title, content.article_content select art.id, art.article_title, content.article_content
from forest_article art 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;
</select> </select>
<select id="getArticlesByIds" resultMap="DTOResultMap"> <select id="getArticlesByIds" resultMap="DTOResultMap">
@ -65,7 +58,7 @@
<select id="getById" resultMap="ResultMapWithBLOBs"> <select id="getById" resultMap="ResultMapWithBLOBs">
select art.id, art.article_title, content.article_content select art.id, art.article_title, content.article_content
from forest_article art 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}; where id = #{id};
</select> </select>
</mapper> </mapper>

View File

@ -4,26 +4,26 @@
<select id="getAllDic" resultType="java.lang.String"> <select id="getAllDic" resultType="java.lang.String">
select dic select dic
from lucene_user_dic from forest_lucene_user_dic
</select> </select>
<select id="getAll" resultType="com.rymcu.forest.lucene.model.UserDic"> <select id="getAll" resultType="com.rymcu.forest.lucene.model.UserDic">
select * select *
from lucene_user_dic from forest_lucene_user_dic
</select> </select>
<insert id="addDic"> <insert id="addDic">
insert into lucene_user_dic(dic) value (#{dic}) insert into forest_lucene_user_dic(dic) value (#{dic})
</insert> </insert>
<delete id="deleteDic"> <delete id="deleteDic">
delete delete
from lucene_user_dic from forest_lucene_user_dic
where id = (#{id}) where id = (#{id})
</delete> </delete>
<update id="updateDic"> <update id="updateDic">
update lucene_user_dic update forest_lucene_user_dic
set dic=#{dic} set dic=#{dic}
where id = (#{id}) where id = (#{id})
</update> </update>

View File

@ -340,16 +340,16 @@ create table forest_visit
) )
comment '浏览表' collate = utf8mb4_unicode_ci; comment '浏览表' collate = utf8mb4_unicode_ci;
create table lucene_user_dic create table forest_lucene_user_dic
( (
id int auto_increment comment '字典编号', id int auto_increment comment '字典编号',
dic char(32) null comment '字典', dic char(32) null comment '字典',
constraint lucene_user_dic_id_uindex constraint forest_lucene_user_dic_id_uindex
unique (id) unique (id)
) )
comment '用户扩展字典'; comment '用户扩展字典';
alter table lucene_user_dic alter table forest_lucene_user_dic
add primary key (id); 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); 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);