xiaoyong931011
2022-07-07 89ebff2b2d96a66fd732d8ecb209d155fa69e946
src/test/java/com/xcong/farmer/cms/KssframeworkApplicationTests.java
@@ -1,6 +1,7 @@
package com.xcong.farmer.cms;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.xcong.farmer.cms.common.response.Result;
import com.xcong.farmer.cms.common.utils.FileUtils;
import com.xcong.farmer.cms.configurations.properties.CmsProperties;
@@ -23,7 +24,9 @@
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@SpringBootTest
class KssframeworkApplicationTests {
@@ -105,9 +108,15 @@
    @Test
    public void dateTest(){
        WebArticleInPageDto webArticleInPageDto = new WebArticleInPageDto();
        webArticleInPageDto.setTimeType("一周内");
        System.out.println(webArticleInPageDto.getTimeType());
        String columnIdStr = "1,2,3";
        if(StrUtil.isNotEmpty(columnIdStr)){
            long[] columnIdLongs = StrUtil.splitToLong(columnIdStr, StrUtil.COMMA);
            List<Long> columnList = new ArrayList<>();
            for(long columnIdLong : columnIdLongs){
                columnList.add(columnIdLong);
            }
            System.out.println(columnList);
        }
    }
}