From 4901af59a86acffbc5b59b41979e4c30676be1f5 Mon Sep 17 00:00:00 2001 From: ant Date: Wed, 31 Jul 2024 16:13:01 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E6=A8=A1=E7=89=88=E7=AE=A1=E7=90=86=202.?= =?UTF-8?q?=20=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=20=E5=BC=82=E5=B8=B8=20?= =?UTF-8?q?3.=20=E5=88=86=E6=9C=9F=20token=20=E6=97=A0=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inspection/ins/GeneratedInsFactory.java | 2 +- .../project/controller/TemplateController.java | 6 ++++-- .../project/service/TbTemplateService.java | 4 +++- .../project/service/impl/TemplateServiceImpl.java | 14 +++++++++----- .../work/service/impl/WrkInfoPhoneServiceImpl.java | 2 +- .../com/chushang/oss/entity/FileSourceInfo.java | 4 ++++ .../com/chushang/oss/entity/dto/UploadFileDTO.java | 8 +++++++- .../com/chushang/oss/feign/RemoteOssService.java | 3 ++- .../chushang/oss/remote/RemoteFileController.java | 6 +++--- 9 files changed, 34 insertions(+), 15 deletions(-) diff --git a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/ins/GeneratedInsFactory.java b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/ins/GeneratedInsFactory.java index 2a312e0..be236cc 100644 --- a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/ins/GeneratedInsFactory.java +++ b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/ins/GeneratedInsFactory.java @@ -82,7 +82,7 @@ public class GeneratedInsFactory { null, false, "", - "downFile", SecurityConstants.INNER); + "wrkGen", SecurityConstants.INNER); // 不为空时, 说明 上传成功 if (listResult.isSuccess() && CollectionUtil.isNotEmpty(listResult.getData())){ log.info("上传成功"); diff --git a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/project/controller/TemplateController.java b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/project/controller/TemplateController.java index 2b03e90..ff2b3c9 100644 --- a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/project/controller/TemplateController.java +++ b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/project/controller/TemplateController.java @@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; +import java.io.IOException; /** * 模板相关管理 @@ -90,8 +91,9 @@ public class TemplateController { @SysLog(value = "模板", businessType = BusinessType.UPLOAD) @PostMapping(value = "/upload") @RequiresPermissions(value = "ins:template:upload") - public AjaxResult uploadTemplate(@RequestParam MultipartFile file){ - return AjaxResult.success(tbTemplateService.uploadFile(file)); + public AjaxResult uploadTemplate(@RequestPart(name = "file") MultipartFile file, + @RequestParam String templateType) throws IOException { + return AjaxResult.success(tbTemplateService.uploadFile(file, templateType)); } } diff --git a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/project/service/TbTemplateService.java b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/project/service/TbTemplateService.java index c1e3540..e8a6efd 100644 --- a/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/project/service/TbTemplateService.java +++ b/chushang-modules/chushang-module-inspection/inspection-service/src/main/java/com/chushang/inspection/project/service/TbTemplateService.java @@ -8,6 +8,8 @@ import com.chushang.inspection.project.po.Template; import com.chushang.oss.entity.vo.FileSourceVo; import org.springframework.web.multipart.MultipartFile; +import java.io.IOException; + /** * @auther: zhao * @date: 2024/7/2 11:04 @@ -27,5 +29,5 @@ public interface TbTemplateService extends IService