fxi
Hentua
2024-01-10 51ea662e22121f9a0ddb5b40c4a8e93e098b34ec
src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/ArticleServiceImpl.java
@@ -131,6 +131,7 @@
        articleEntity.setArticleUrl(adminAddArticleDto.getArticleUrl());
        articleEntity.setType(adminAddArticleDto.getType());
        articleEntity.setContentType(adminAddArticleDto.getContentType());
        articleEntity.setDraftState(adminAddArticleDto.getDraftState());
        this.baseMapper.insert(articleEntity);
        if (adminAddArticleDto.getSaveState() == 2) {
@@ -214,6 +215,7 @@
        String authorBelong = adminUpdateArticleDto.getAuthorBelong();
        articleEntity.setAuthorBelong(authorBelong);
        articleEntity.setDraftState(adminUpdateArticleDto.getDraftState());
        this.baseMapper.updateById(articleEntity);
        if (adminUpdateArticleDto.getSaveState() == 2) {
@@ -235,6 +237,8 @@
//                this.baseMapper.updateById(articleEntity);
                if (articleEntity != null) {
                    this.baseMapper.deleteById(articleId);
                    releaseService.releaseColumn(articleEntity.getColumnId(), 2, articleEntity.getCompanyId());
                }
            }
        }
@@ -322,6 +326,7 @@
        if(ObjectUtil.isEmpty(articleEntity)){
            return Result.fail("文章不存在");
        }
        articleEntity.setDraftState(2);
        articleEntity.setReleaseStatus(ArticleEntity.RELEASE_STATUS_YES);
        this.baseMapper.updateById(articleEntity);