fix
Helius
2022-08-07 885e0a453347479d8fd9c3ea41747ffc28d51a5b
fix
2 files modified
17 ■■■■ changed files
src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/ReleaseServiceImpl.java 7 ●●●● patch | view | raw | blame | history
src/test/java/com/xcong/farmer/cms/TemplateTest.java 10 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/ReleaseServiceImpl.java
@@ -1,5 +1,6 @@
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;
@@ -124,8 +125,10 @@
                }
                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());
                }
            }
        }
src/test/java/com/xcong/farmer/cms/TemplateTest.java
@@ -2,11 +2,13 @@
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.StrUtil;
import com.xcong.farmer.cms.modules.system.service.IReleaseService;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import java.io.File;
@@ -49,4 +51,12 @@
            }
        }
    }
    @Autowired
    private IReleaseService releaseService;
    @Test
    public void columnTest() {
        releaseService.releaseColumn(135L, 1, 26L);
    }
}