diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/file/FileConfigServiceImplTest.java b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/file/FileConfigServiceImplTest.java index bcaa1bf78..1b28b0e12 100755 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/file/FileConfigServiceImplTest.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/file/FileConfigServiceImplTest.java @@ -214,12 +214,13 @@ public class FileConfigServiceImplTest extends BaseDbUnitTest { // 测试 storage 不匹配 fileConfigMapper.insert(cloneIgnoreId(dbFileConfig, o -> o.setStorage(FileStorageEnum.DB.getStorage()))); // 测试 createTime 不匹配 - fileConfigMapper.insert(cloneIgnoreId(dbFileConfig, o -> o.setCreateTime(LocalDateTimeUtil.parse("2020-01-23", DatePattern.NORM_DATE_PATTERN)))); + fileConfigMapper.insert(cloneIgnoreId(dbFileConfig, o -> o.setCreateTime(LocalDateTimeUtil.parse("2020-11-23", DatePattern.NORM_DATE_PATTERN)))); // 准备参数 FileConfigPageReqVO reqVO = new FileConfigPageReqVO(); reqVO.setName("芋道"); reqVO.setStorage(FileStorageEnum.LOCAL.getStorage()); - reqVO.setCreateTime((new LocalDateTime[]{buildLocalDateTime(2022, 11, 10),buildLocalDateTime(2022, 11, 12)})); + reqVO.setCreateTime((new LocalDateTime[]{buildLocalDateTime(2020, 1, 1), + buildLocalDateTime(2020, 1, 24)})); // 调用 PageResult pageResult = fileConfigService.getFileConfigPage(reqVO); diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/file/FileServiceTest.java b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/file/FileServiceTest.java index f482238ec..33473360a 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/file/FileServiceTest.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/java/cn/iocoder/yudao/module/infra/service/file/FileServiceTest.java @@ -90,7 +90,7 @@ public class FileServiceTest extends BaseDbUnitTest { assertEquals(10L, file.getConfigId()); assertEquals(path, file.getPath()); assertEquals(url, file.getUrl()); - assertEquals("image/jpg", file.getType()); + assertEquals("image/jpeg", file.getType()); assertEquals(content.length, file.getSize()); } diff --git a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/create_tables.sql b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/create_tables.sql index c60230a4c..5825e0fef 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/create_tables.sql +++ b/yudao-module-infra/yudao-module-infra-biz/src/test/resources/sql/create_tables.sql @@ -34,6 +34,7 @@ CREATE TABLE IF NOT EXISTS "infra_file_config" ( CREATE TABLE IF NOT EXISTS "infra_file" ( "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, "config_id" bigint NOT NULL, + "name" varchar(256), "path" varchar(512), "url" varchar(1024), "type" varchar(63) DEFAULT NULL,