🎨 统一表命名,以 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>
</plugin>
</plugins>
<finalName>vertical-console</finalName>
<finalName>forest</finalName>
</build>
</project>

View File

@ -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

View File

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

View File

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

View File

@ -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);