| | |
| | | if(StrUtil.isNotEmpty(title)){ |
| | | articleEntity.setTitle(title); |
| | | } |
| | | Integer contentType = adminArticleDto.getContentType() == null ? 0 : adminArticleDto.getContentType(); |
| | | if(contentType != 0){ |
| | | articleEntity.setContentType(adminArticleDto.getContentType()); |
| | | } |
| | | if(UserEntity.USER_BELONG_TOP != companyId){ |
| | | articleEntity.setCompanyId(companyId); |
| | | } |
| | |
| | | |
| | | articleEntity.setArticleUrl(adminAddArticleDto.getArticleUrl()); |
| | | articleEntity.setType(adminAddArticleDto.getType()); |
| | | articleEntity.setContentType(adminAddArticleDto.getContentType()); |
| | | this.baseMapper.insert(articleEntity); |
| | | return Result.ok("添加成功"); |
| | | } |
| | |
| | | |
| | | articleEntity.setArticleUrl(adminUpdateArticleDto.getArticleUrl()); |
| | | articleEntity.setType(adminUpdateArticleDto.getType()); |
| | | articleEntity.setContentType(adminUpdateArticleDto.getContentType()); |
| | | this.baseMapper.updateById(articleEntity); |
| | | return Result.ok("更新成功"); |
| | | } |
| | |
| | | articleEntity.setReleaseStatus(ArticleEntity.RELEASE_STATUS_YES); |
| | | this.baseMapper.updateById(articleEntity); |
| | | return Result.ok("操作成功"); |
| | | } |
| | | |
| | | @Override |
| | | public void releaseArticle(Long id) { |
| | | ArticleEntity article = this.baseMapper.selectById(id); |
| | | |
| | | ColumnEntity column = columnMapper.selectById(article.getColumnId()); |
| | | cmsCoreService.articleProcess(article.getId(), column.getArticleTemplate()); |
| | | } |
| | | } |