| | |
| | | @Autowired |
| | | private WebSetMapper webSetMapper; |
| | | |
| | | private final Executor executor = new ThreadPoolExecutor(5, 20, 600, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>()); |
| | | |
| | | // @Override |
| | | // public void releaseArticle(Long id, Long companyId) { |
| | | // ArticleEntity article = articleMapper.selectById(id); |
| | | // ColumnEntity column = columnMapper.selectById(article.getColumnId()); |
| | | // |
| | | // 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); |
| | | // |
| | | // executor.execute(() -> { |
| | | // 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 != null && !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 |
| | | public void releaseArticle(Long id, Long companyId) { |
| | | ArticleEntity article = articleMapper.selectById(id); |