| | |
| | | String atlas = adminAddArticleDto.getAtlas(); |
| | | articleEntity.setAtlas(atlas); |
| | | Date releaseTime = adminAddArticleDto.getReleaseTime(); |
| | | if (releaseTime == null) { |
| | | releaseTime = new Date(); |
| | | } |
| | | articleEntity.setReleaseTime(releaseTime); |
| | | Integer isTop = adminAddArticleDto.getIsTop(); |
| | | articleEntity.setIsTop(isTop); |
| | |
| | | if(ObjectUtil.isEmpty(columnEntity)){ |
| | | return Result.fail("请选择文章栏目"); |
| | | } |
| | | |
| | | if (!articleEntity.getColumnId().equals(columnId) && articleEntity.getBeforeColumnId() == -1) { |
| | | articleEntity.setBeforeColumnId(articleEntity.getColumnId()); |
| | | } |
| | | articleEntity.setColumnId(columnId); |
| | | |
| | | Integer visits = adminUpdateArticleDto.getVisits() == null ? 0 : adminUpdateArticleDto.getVisits(); |
| | | articleEntity.setVisits(visits); |
| | | String mainDiagram = adminUpdateArticleDto.getMainDiagram(); |
| | |
| | | articleEntity.setArticleUrl(adminUpdateArticleDto.getArticleUrl()); |
| | | articleEntity.setType(adminUpdateArticleDto.getType()); |
| | | articleEntity.setContentType(adminUpdateArticleDto.getContentType()); |
| | | |
| | | String authorBelong = adminUpdateArticleDto.getAuthorBelong(); |
| | | articleEntity.setAuthorBelong(authorBelong); |
| | | this.baseMapper.updateById(articleEntity); |
| | |
| | | } |
| | | articleEntity.setReleaseStatus(ArticleEntity.RELEASE_STATUS_NO); |
| | | this.baseMapper.updateById(articleEntity); |
| | | |
| | | releaseService.releaseColumn(articleEntity.getColumnId(), 2, articleEntity.getCompanyId()); |
| | | return Result.ok("操作成功"); |
| | | } |
| | | |
| | |
| | | return Result.fail("文章不存在"); |
| | | } |
| | | articleEntity.setReleaseStatus(ArticleEntity.RELEASE_STATUS_YES); |
| | | articleEntity.setBeforeColumnId(null); |
| | | this.baseMapper.updateById(articleEntity); |
| | | |
| | | releaseService.releaseArticle(articleEntity.getId(), companyId); |