| | |
| | | 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<>(); |
| | |
| | | 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); |
| | | }); |
| | | } |