| | |
| | | @Override |
| | | public void releaseColumn(Long id, int type, Long companyId) { |
| | | ColumnEntity columnEntity = columnMapper.selectById(id); |
| | | Map<String, Object> map = new Hashtable<>(); |
| | | map.put("id", columnEntity.getId()); |
| | | map.put("code", columnEntity.getColumnCode()); |
| | | if (columnEntity.getParentId() == 0L) { |
| | | map.put("parentCode", columnEntity.getColumnCode()); |
| | | } else { |
| | | ColumnEntity parent = columnMapper.selectById(columnEntity.getParentId()); |
| | | map.put("parentCode", parent.getColumnCode()); |
| | | } |
| | | map.put("templatePath", columnEntity.getPath()); |
| | | map.put("companyId", companyId); |
| | | Map<String, Object> map = buildColumnData(columnEntity); |
| | | |
| | | executor.execute(() -> { |
| | | cmsCoreService.columnProcess(map, columnEntity.getListTemplate()); |
| | |
| | | List<ColumnEntity> columns = columnMapper.selectColumnByParentId(columnEntity.getId(), companyId, 2); |
| | | if (CollUtil.isNotEmpty(columns)) { |
| | | for (ColumnEntity column : columns) { |
| | | map.put("id", column.getId()); |
| | | map.put("code", column.getColumnCode()); |
| | | cmsCoreService.columnProcess(map, column.getListTemplate()); |
| | | Map<String, Object> data = buildColumnData(column); |
| | | cmsCoreService.columnProcess(data, column.getListTemplate()); |
| | | |
| | | List<Long> ids = articleMapper.selectArticleIdsByColumnId(column.getId(), companyId,type); |
| | | cmsCoreService.articlesProcess(map, ids, column.getArticleTemplate(), column.getPath()); |
| | | cmsCoreService.articlesProcess(data, ids, column.getArticleTemplate(), column.getPath()); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | private Map<String, Object> buildColumnData(ColumnEntity columnEntity) { |
| | | Map<String, Object> map = new Hashtable<>(); |
| | | map.put("id", columnEntity.getId()); |
| | | map.put("code", columnEntity.getColumnCode()); |
| | | if (columnEntity.getParentId() == 0L) { |
| | | map.put("parentCode", columnEntity.getColumnCode()); |
| | | } else { |
| | | ColumnEntity parent = columnMapper.selectById(columnEntity.getParentId()); |
| | | map.put("parentCode", parent.getColumnCode()); |
| | | } |
| | | map.put("templatePath", columnEntity.getPath()); |
| | | map.put("companyId", columnEntity.getCompanyId()); |
| | | return map; |
| | | } |
| | | |
| | | @Override |
| | | public void releaseIndex(Long companyId) { |
| | | Map<String, Object> map = new HashMap<>(); |