|
@@ -109,6 +109,13 @@ public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article> impl
|
|
|
|
|
|
@Override
|
|
|
public void updateArticle(Article article) {
|
|
|
+ String categoryId = article.getCategoryId();
|
|
|
+ Category category = categoryService.getById(categoryId);
|
|
|
+ if (category.getIsPublic().equals("1")){
|
|
|
+ article.setIsPublic("1");
|
|
|
+ } else {
|
|
|
+ article.setIsPublic("0");
|
|
|
+ }
|
|
|
this.deleteCategoryR(article.getId());
|
|
|
this.deleteTagR(article.getId());
|
|
|
this.updateById(article);
|