| | |
| | | articleEntity.setAtlas(atlas); |
| | | Date releaseTime = adminAddArticleDto.getReleaseTime(); |
| | | articleEntity.setReleaseTime(releaseTime); |
| | | Integer isTop = adminAddArticleDto.getIsTop(); |
| | | articleEntity.setIsTop(isTop); |
| | | Integer releaseStatus = adminAddArticleDto.getReleaseStatus(); |
| | | articleEntity.setReleaseStatus(releaseStatus); |
| | | String articleDetails = adminAddArticleDto.getArticleDetails(); |
| | |
| | | if(ObjectUtil.isEmpty(articleEntity)){ |
| | | return Result.fail("文章不存在"); |
| | | } |
| | | Integer isTop = adminUpdateArticleDto.getIsTop(); |
| | | articleEntity.setIsTop(isTop); |
| | | Integer releaseStatus = adminUpdateArticleDto.getReleaseStatus(); |
| | | articleEntity.setReleaseStatus(releaseStatus); |
| | | String title = adminUpdateArticleDto.getTitle(); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public Result updateIstop(Long id) { |
| | | ArticleEntity articleEntity = this.baseMapper.selectById(id); |
| | | if(ObjectUtil.isEmpty(articleEntity)){ |
| | | return Result.fail("文章不存在"); |
| | | } |
| | | articleEntity.setIsTop(ArticleEntity.ISTOP_YES); |
| | | this.baseMapper.updateById(articleEntity); |
| | | return Result.ok("操作成功"); |
| | | } |
| | | |
| | | @Override |
| | | public Result updateIstopOff(Long id) { |
| | | ArticleEntity articleEntity = this.baseMapper.selectById(id); |
| | | if(ObjectUtil.isEmpty(articleEntity)){ |
| | | return Result.fail("文章不存在"); |
| | | } |
| | | articleEntity.setIsTop(ArticleEntity.ISTOP_NO); |
| | | this.baseMapper.updateById(articleEntity); |
| | | return Result.ok("操作成功"); |
| | | } |
| | | |
| | | @Override |
| | | public Result updateStatusOn(Long id) { |
| | | ArticleEntity articleEntity = this.baseMapper.selectById(id); |
| | | if(ObjectUtil.isEmpty(articleEntity)){ |