fix
Helius
2022-07-11 9f091d8653a854c8fcd8164ded2acb3888e0e2c7
src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/ReleaseServiceImpl.java
@@ -46,7 +46,8 @@
        ArticleEntity article = articleMapper.selectById(id);
        ColumnEntity column = columnMapper.selectById(article.getColumnId());
        article.setBeforeColumnId(null);
        Long beforeColumnId = article.getBeforeColumnId();
        article.setBeforeColumnId(-1L);
        articleMapper.updateById(article);
        Map<String, Object> data = new Hashtable<>();
@@ -60,6 +61,15 @@
            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);
        });
    }