| | |
| | | articleEntity.setType(adminAddArticleDto.getType()); |
| | | articleEntity.setContentType(adminAddArticleDto.getContentType()); |
| | | this.baseMapper.insert(articleEntity); |
| | | |
| | | if (adminAddArticleDto.getSaveState() == 2) { |
| | | releaseService.releaseArticle(articleEntity.getId(), articleEntity.getCompanyId()); |
| | | } |
| | | return Result.ok("添加成功"); |
| | | } |
| | | |
| | |
| | | String authorBelong = adminUpdateArticleDto.getAuthorBelong(); |
| | | articleEntity.setAuthorBelong(authorBelong); |
| | | this.baseMapper.updateById(articleEntity); |
| | | |
| | | if (adminUpdateArticleDto.getSaveState() == 2) { |
| | | releaseService.releaseArticle(articleEntity.getId(), articleEntity.getCompanyId()); |
| | | } |
| | | return Result.ok("更新成功"); |
| | | } |
| | | |
| | |
| | | Long articleId = Long.valueOf(articleIdStr); |
| | | |
| | | ArticleEntity articleEntity = this.baseMapper.selectById(articleId); |
| | | articleEntity.setDelStatus(ArticleEntity.DELETE_STATUS_YES); |
| | | this.baseMapper.updateById(articleEntity); |
| | | // articleEntity.setDelStatus(ArticleEntity.DELETE_STATUS_YES); |
| | | // this.baseMapper.updateById(articleEntity); |
| | | if (articleEntity != null) { |
| | | this.baseMapper.deleteById(articleId); |
| | | } |
| | | } |
| | | } |
| | | return Result.ok("删除成功"); |