From b741ed480b0d0df9711d47c1bbe2dd692cfec126 Mon Sep 17 00:00:00 2001 From: jiangqiang Date: Thu, 7 Jul 2022 10:51:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E4=B8=8A=E6=AC=A1?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=AF=BC=E8=87=B4=E7=9A=84=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=8F=96=E5=80=BC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/file/vo/file/FilePageReqVO.java | 4 ++-- .../controller/admin/file/vo/file/FileRespVO.java | 7 +++++-- .../module/infra/dal/mysql/file/FileMapper.java | 2 +- yudao-ui-admin/src/views/infra/file/index.vue | 13 +++++++------ 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java index 346314e83..043cf11bb 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FilePageReqVO.java @@ -21,8 +21,8 @@ public class FilePageReqVO extends PageParam { @ApiModelProperty(value = "文件路径", example = "yudao", notes = "模糊匹配") private String path; - @ApiModelProperty(value = "文件类型", example = "jpg", notes = "模糊匹配") - private String type; + @ApiModelProperty(value = "文件扩展名", example = "jpg", notes = "模糊匹配") + private String extName; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @ApiModelProperty(value = "开始创建时间") diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileRespVO.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileRespVO.java index 10737693d..7a53bf2e1 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileRespVO.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/controller/admin/file/vo/file/FileRespVO.java @@ -22,8 +22,11 @@ public class FileRespVO { @ApiModelProperty(value = "文件 URL", required = true, example = "https://www.iocoder.cn/yudao.jpg") private String url; - @ApiModelProperty(value = "文件类型", example = "jpg") - private String type; + @ApiModelProperty(value = "文件扩展名", example = "jpg") + private String extName; + + @ApiModelProperty(value = "文件MIME类型", example = "application/octet-stream") + private String mimeType; @ApiModelProperty(value = "文件大小", example = "2048", required = true) private Integer size; diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/mysql/file/FileMapper.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/mysql/file/FileMapper.java index 8cf50cddc..28c37067c 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/mysql/file/FileMapper.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/dal/mysql/file/FileMapper.java @@ -18,7 +18,7 @@ public interface FileMapper extends BaseMapperX { default PageResult selectPage(FilePageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() .likeIfPresent(FileDO::getPath, reqVO.getPath()) - .likeIfPresent(FileDO::getExtName, reqVO.getType()) + .likeIfPresent(FileDO::getExtName, reqVO.getExtName()) .betweenIfPresent(FileDO::getCreateTime, reqVO.getBeginCreateTime(), reqVO.getEndCreateTime()) .orderByDesc(FileDO::getId)); } diff --git a/yudao-ui-admin/src/views/infra/file/index.vue b/yudao-ui-admin/src/views/infra/file/index.vue index 462a879de..76e189c83 100644 --- a/yudao-ui-admin/src/views/infra/file/index.vue +++ b/yudao-ui-admin/src/views/infra/file/index.vue @@ -26,14 +26,15 @@ - - - + + + - + + - + @@ -101,7 +102,7 @@ export default { pageNo: 1, pageSize: 10, path: null, - type: null, + extName: null, }, // 用户导入参数 upload: {