fix
Helius
2022-08-30 90f9311b8f92d84533860e374c2a38c16f8a6e7d
src/main/java/com/xcong/farmer/cms/core/handler/ColumnDataParserHandler.java
@@ -26,12 +26,13 @@
    private ColumnMapper columnMapper = SpringContextHolder.getBean(ColumnMapper.class);
    private ArticleMapper articleMapper = SpringContextHolder.getBean(ArticleMapper.class);
    private CmsProperties cmsProperties = SpringContextHolder.getBean(CmsProperties.class);
    private String baseUrl = "";
    @Override
    public void dataParser(AttrNode attrNode) {
        log.info("栏目解析");
//        log.info("栏目解析");
        Long companyId = (Long) attrNode.getSystemDataValue("companyId");
        baseUrl = (String) attrNode.getSystemDataValue("baseUrl");
        Column param = (Column) attrNode.getParam();
@@ -59,14 +60,14 @@
    public ColumnData columnToData(ColumnEntity column) {
        ColumnData columnData = ColumnConversion.INSTANCE.entityToData(column);
        columnData.setUrl(cmsProperties.getBaseUrl() + column.getPath());
        columnData.setUrl(baseUrl + column.getPath());
        if (column.getType() == 2) {
            if (column.getTargetType() == 1) {
                ArticleEntity article = this.articleMapper.selectArticleById(Long.parseLong(column.getTargetUrl()));
                columnData.setUrl(cmsProperties.getBaseUrl() + article.getPath() + "/" + article.getId() + ".html");
                columnData.setUrl(baseUrl + article.getPath() + "/" + article.getId() + ".html");
            } else if (column.getTargetType() == 2) {
                ColumnEntity columnEntity = this.columnMapper.selectByCodeAndCompanyId(column.getTargetUrl(), column.getCompanyId());
                columnData.setUrl(cmsProperties.getBaseUrl() + columnEntity.getPath());
                columnData.setUrl(baseUrl + columnEntity.getPath());
            } else {
                columnData.setUrl(column.getTargetUrl());
            }