From 54c613f641b8274cddd5687600ca7ebcae2a3273 Mon Sep 17 00:00:00 2001 From: x ronger Date: Wed, 18 Dec 2019 01:15:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E7=AD=BE=E6=A8=A1=E5=9D=97=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/mapper/ArticleMapper.xml | 13 +++++++++++++ src/main/java/mapper/TagMapper.xml | 6 ++++++ 2 files changed, 19 insertions(+) diff --git a/src/main/java/mapper/ArticleMapper.xml b/src/main/java/mapper/ArticleMapper.xml index 881c4a4..238cabe 100644 --- a/src/main/java/mapper/ArticleMapper.xml +++ b/src/main/java/mapper/ArticleMapper.xml @@ -49,6 +49,13 @@ + + + + + + + insert into vertical_article_content (id_article,article_content,article_content_html,created_time,updated_time) values (#{idArticle},#{articleContent},#{articleContentHtml},sysdate(),sysdate()) @@ -56,6 +63,9 @@ update vertical_article_content set article_content = #{articleContent},article_content_html = #{articleContentHtml},updated_time = sysdate() where id_article = #{idArticle} + + delete from vertical_tag_article where id_article = #{id} + @@ -77,4 +87,7 @@ + \ No newline at end of file diff --git a/src/main/java/mapper/TagMapper.xml b/src/main/java/mapper/TagMapper.xml index ad5504e..32baccd 100644 --- a/src/main/java/mapper/TagMapper.xml +++ b/src/main/java/mapper/TagMapper.xml @@ -23,6 +23,12 @@ insert into vertical_user_tag (id_tag,id_user,type,created_time,updated_time) values (#{idTag},#{idUser},#{type},sysdate(),sysdate()) + + update vertical_tag set tag_uri = #{tagUri}, tag_icon_path = #{tagIconPath}, tag_status = #{tagStatus}, tag_description = #{tagDescription} where id = #{idTag} + + + delete from vertical_tag where id not in (select * from (select id_tag from vertical_tag_article vta left join vertical_article va on vta.id_article = va.id where va.id is not null) tmp); +