| | |
| | | package com.xcong.farmer.cms.modules.system.service.Impl; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.io.FileUtil; |
| | | import com.xcong.farmer.cms.common.utils.FileUtils; |
| | |
| | | releaseColumn(column.getParentId(), 1, companyId); |
| | | } |
| | | |
| | | if (beforeColumnId != null && !article.getColumnId().equals(beforeColumnId)) { |
| | | if (beforeColumnId != -1 && !article.getColumnId().equals(beforeColumnId)) { |
| | | ColumnEntity beforeColumn = columnMapper.selectById(beforeColumnId); |
| | | this.releaseColumn(beforeColumnId, 1, companyId); |
| | | if (beforeColumn.getParentId() != 0L) { |
| | |
| | | } |
| | | |
| | | if (article.getType() == 1) { |
| | | map.put("id", article.getId()); |
| | | cmsCoreService.articleProcess(map, columnEntity.getArticleTemplate(), columnEntity.getPath()); |
| | | Map<String, Object> articleMap = new HashMap<>(); |
| | | BeanUtil.copyProperties(map, articleMap); |
| | | articleMap.put("id", article.getId()); |
| | | cmsCoreService.articleProcess(articleMap, columnEntity.getArticleTemplate(), columnEntity.getPath()); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | if (article.getType() == 1) { |
| | | map.put("id", article.getId()); |
| | | cmsCoreService.articleProcess(map, column.getArticleTemplate(), column.getPath()); |
| | | Map<String, Object> articleMap = new HashMap<>(); |
| | | BeanUtil.copyProperties(map, articleMap); |
| | | articleMap.put("id", article.getId()); |
| | | cmsCoreService.articleProcess(articleMap, column.getArticleTemplate(), column.getPath()); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | cmsCoreService.indexProcess(map, webSetting.getIndexTemplate()); |
| | | if (hasSearch) { |
| | | cmsCoreService.process(map, "search", webSetting.getSearchTemplate()); |
| | | cmsCoreService.process(map, "message", webSetting.getMsgTemplate()); |
| | | Map<String, Object> search = new HashMap<>(); |
| | | search.put("companyId", companyId); |
| | | |
| | | Map<String, Object> message = new HashMap<>(); |
| | | message.put("companyId", companyId); |
| | | |
| | | cmsCoreService.process(search, "search", webSetting.getSearchTemplate()); |
| | | cmsCoreService.process(message, "message", webSetting.getMsgTemplate()); |
| | | } |
| | | } |
| | | |