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} +