From b4f9074338d9d1c5da47cf0e08afdc101900d214 Mon Sep 17 00:00:00 2001 From: ronger Date: Tue, 2 Feb 2021 09:45:46 +0800 Subject: [PATCH] :bug: https://github.com/rymcu/forest/issues/31 --- src/main/java/com/rymcu/forest/mapper/ArticleMapper.java | 6 ++++++ .../com/rymcu/forest/service/impl/ArticleServiceImpl.java | 2 ++ src/main/java/mapper/ArticleMapper.xml | 3 +++ 3 files changed, 11 insertions(+) diff --git a/src/main/java/com/rymcu/forest/mapper/ArticleMapper.java b/src/main/java/com/rymcu/forest/mapper/ArticleMapper.java index 4f9d5ca..58a34d2 100644 --- a/src/main/java/com/rymcu/forest/mapper/ArticleMapper.java +++ b/src/main/java/com/rymcu/forest/mapper/ArticleMapper.java @@ -184,4 +184,10 @@ public interface ArticleMapper extends Mapper
{ * @return */ int updatePerfect(@Param("idArticle") Integer idArticle, @Param("articlePerfect") String articlePerfect); + + /** + * 删除文章关联文章内容表信息 + * @param idArticle + */ + void deleteArticleContent(@Param("idArticle") Integer idArticle); } diff --git a/src/main/java/com/rymcu/forest/service/impl/ArticleServiceImpl.java b/src/main/java/com/rymcu/forest/service/impl/ArticleServiceImpl.java index faaa500..386dee6 100644 --- a/src/main/java/com/rymcu/forest/service/impl/ArticleServiceImpl.java +++ b/src/main/java/com/rymcu/forest/service/impl/ArticleServiceImpl.java @@ -268,6 +268,8 @@ public class ArticleServiceImpl extends AbstractService
implements Arti articleMapper.deleteLinkedPortfolioData(id); // 删除引用标签记录 articleMapper.deleteTagArticle(id); + // 删除文章内容表 + articleMapper.deleteArticleContent(id); } @Override diff --git a/src/main/java/mapper/ArticleMapper.xml b/src/main/java/mapper/ArticleMapper.xml index 240f694..6378b98 100644 --- a/src/main/java/mapper/ArticleMapper.xml +++ b/src/main/java/mapper/ArticleMapper.xml @@ -97,6 +97,9 @@ delete from forest_portfolio_article where id_article = #{id} + + delete from forest_article_content where id_article = #{idArticle} +