From 8466105a9b8b2fd807ac9d3029e4da7bc609d551 Mon Sep 17 00:00:00 2001 From: Charles7c Date: Wed, 9 Oct 2024 20:30:11 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E7=A7=BB=E9=99=A4=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=97=B6=E7=9A=84=E5=A4=9A=E4=BD=99=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../continew/admin/controller/common/CommonController.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/continew-admin-webapi/src/main/java/top/continew/admin/controller/common/CommonController.java b/continew-admin-webapi/src/main/java/top/continew/admin/controller/common/CommonController.java index 42b635dd4..c4398fbf2 100644 --- a/continew-admin-webapi/src/main/java/top/continew/admin/controller/common/CommonController.java +++ b/continew-admin-webapi/src/main/java/top/continew/admin/controller/common/CommonController.java @@ -38,7 +38,6 @@ import top.continew.admin.system.model.query.RoleQuery; import top.continew.admin.system.model.resp.FileUploadResp; import top.continew.admin.system.service.*; -import top.continew.starter.core.autoconfigure.project.ProjectProperties; import top.continew.starter.core.util.validate.ValidationUtils; import top.continew.starter.extension.crud.model.query.SortQuery; import top.continew.starter.extension.crud.model.resp.LabelValueResp; @@ -60,7 +59,6 @@ @RequestMapping("/common") public class CommonController { - private final ProjectProperties projectProperties; private final FileService fileService; private final DeptService deptService; private final MenuService menuService; @@ -71,8 +69,6 @@ public class CommonController { @Operation(summary = "上传文件", description = "上传文件") @PostMapping("/file") public FileUploadResp upload(@NotNull(message = "文件不能为空") MultipartFile file) { - // TODO 实际开发时请删除本条校验 - ValidationUtils.throwIf(projectProperties.isProduction(), "演示环境不支持上传文件"); ValidationUtils.throwIf(file::isEmpty, "文件不能为空"); FileInfo fileInfo = fileService.upload(file); return FileUploadResp.builder().url(fileInfo.getUrl()).build();