| | |
| | | ArticleEntity article = articleMapper.selectById(id); |
| | | ColumnEntity column = columnMapper.selectById(article.getColumnId()); |
| | | |
| | | Long beforeColumnId = article.getBeforeColumnId(); |
| | | article.setBeforeColumnId(-1L); |
| | | articleMapper.updateById(article); |
| | | AppContants.EXECUTOR.execute(() -> { |
| | | Long beforeColumnId = article.getBeforeColumnId(); |
| | | article.setBeforeColumnId(-1L); |
| | | articleMapper.updateById(article); |
| | | |
| | | Map<String, Object> data = new Hashtable<>(); |
| | | data.put("id", article.getId()); |
| | | data.put("companyId", companyId); |
| | | Map<String, Object> data = new Hashtable<>(); |
| | | data.put("id", article.getId()); |
| | | data.put("companyId", companyId); |
| | | |
| | | log.info("执行文章发布"); |
| | | cmsCoreService.articleProcess(data, column.getArticleTemplate(), column.getPath()); |
| | | log.info("执行文章发布"); |
| | | cmsCoreService.articleProcess(data, column.getArticleTemplate(), column.getPath()); |
| | | |
| | | this.releaseColumn(column.getId(), 1, companyId); |
| | | if (column.getParentId() != 0L) { |
| | | releaseColumn(column.getParentId(), 1, companyId); |
| | | } |
| | | |
| | | if (beforeColumnId != -1 && !article.getColumnId().equals(beforeColumnId)) { |
| | | ColumnEntity beforeColumn = columnMapper.selectById(beforeColumnId); |
| | | this.releaseColumn(beforeColumnId, 1, companyId); |
| | | if (beforeColumn.getParentId() != 0L) { |
| | | this.releaseColumn(beforeColumn.getParentId(), 1, companyId); |
| | | this.releaseColumn(column.getId(), 1, companyId); |
| | | if (column.getParentId() != 0L) { |
| | | releaseColumn(column.getParentId(), 1, companyId); |
| | | } |
| | | } |
| | | |
| | | this.releaseIndex(companyId, false); |
| | | if (beforeColumnId != -1 && !article.getColumnId().equals(beforeColumnId)) { |
| | | ColumnEntity beforeColumn = columnMapper.selectById(beforeColumnId); |
| | | this.releaseColumn(beforeColumnId, 1, companyId); |
| | | if (beforeColumn.getParentId() != 0L) { |
| | | this.releaseColumn(beforeColumn.getParentId(), 1, companyId); |
| | | } |
| | | } |
| | | |
| | | this.releaseIndex(companyId, false); |
| | | }); |
| | | } |
| | | |
| | | @Override |