fix
wzy
2022-08-07 ef5505e22c84a63d966f35cee78afa544ece57df
src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/ReleaseServiceImpl.java
@@ -55,41 +55,6 @@
    @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);