| | |
| | | articleEntity.setArticleUrl(adminAddArticleDto.getArticleUrl()); |
| | | articleEntity.setType(adminAddArticleDto.getType()); |
| | | articleEntity.setContentType(adminAddArticleDto.getContentType()); |
| | | articleEntity.setDraftState(adminAddArticleDto.getDraftState()); |
| | | this.baseMapper.insert(articleEntity); |
| | | |
| | | if (adminAddArticleDto.getSaveState() == 2) { |
| | |
| | | |
| | | String authorBelong = adminUpdateArticleDto.getAuthorBelong(); |
| | | articleEntity.setAuthorBelong(authorBelong); |
| | | articleEntity.setDraftState(adminUpdateArticleDto.getDraftState()); |
| | | this.baseMapper.updateById(articleEntity); |
| | | |
| | | if (adminUpdateArticleDto.getSaveState() == 2) { |
| | |
| | | if(ObjectUtil.isEmpty(articleEntity)){ |
| | | return Result.fail("文章不存在"); |
| | | } |
| | | articleEntity.setDraftState(2); |
| | | articleEntity.setReleaseStatus(ArticleEntity.RELEASE_STATUS_YES); |
| | | this.baseMapper.updateById(articleEntity); |
| | | |