1 files added
2 files modified
| | |
| | | package com.xcong.farmer.cms.core.handler; |
| | | |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.xcong.farmer.cms.configurations.properties.CmsProperties; |
| | | import com.xcong.farmer.cms.conversion.ArticleConversion; |
| | | import com.xcong.farmer.cms.core.node.AttrNode; |
| | | import com.xcong.farmer.cms.core.tag.data.ArticleChildData; |
| | | import com.xcong.farmer.cms.core.tag.data.ArticleData; |
| | | import com.xcong.farmer.cms.core.tag.model.Article; |
| | | import com.xcong.farmer.cms.modules.system.entity.ArticleEntity; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | articleData.setNext(new ArticleData()); |
| | | } |
| | | |
| | | if (StrUtil.isNotBlank(data.getAtlas())) { |
| | | List<ArticleChildData> children = new ArrayList<>(); |
| | | StrUtil.split(data.getAtlas(), ',').forEach(item -> { |
| | | ArticleChildData child = new ArticleChildData(); |
| | | child.setUrl(item); |
| | | children.add(child); |
| | | }); |
| | | articleData.setChildren(children); |
| | | } |
| | | |
| | | node.setData(articleData); |
| | | } |
| | | } |
New file |
| | |
| | | package com.xcong.farmer.cms.core.tag.data; |
| | | |
| | | public class ArticleChildData { |
| | | |
| | | private String url; |
| | | |
| | | public String getUrl() { |
| | | return url; |
| | | } |
| | | |
| | | public void setUrl(String url) { |
| | | this.url = url; |
| | | } |
| | | } |
| | |
| | | |
| | | private ArticleData prev; |
| | | |
| | | private List<ArticleChildData> children; |
| | | |
| | | public String getCompany() { |
| | | return company; |
| | | } |
| | |
| | | public void setDescription(String description) { |
| | | this.description = description; |
| | | } |
| | | |
| | | public List<ArticleChildData> getChildren() { |
| | | return children; |
| | | } |
| | | |
| | | public void setChildren(List<ArticleChildData> children) { |
| | | this.children = children; |
| | | } |
| | | } |