From 7fd5caec09f75b59aa2e1dc8efd4a1c5a6388784 Mon Sep 17 00:00:00 2001 From: Diyu0904 <1819728964@qq.com> Date: Fri, 21 Mar 2025 15:28:05 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E6=93=A6=E9=99=A4=E6=95=8F=E6=84=9F=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mcwl/resource/service/impl/ModelVersionServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelVersionServiceImpl.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelVersionServiceImpl.java index 279445a..164c6ba 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelVersionServiceImpl.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/ModelVersionServiceImpl.java @@ -100,9 +100,14 @@ public class ModelVersionServiceImpl extends ServiceImpl< ModelVersionMapper,Mo Long userIdMax = SecurityUtils.getUserIdMax(); if (userIdMax != 0){ + //擦掉敏感数据 for (ModelVersion modelVersion : modelVersions) { + modelVersion.setObjectKey(""); + modelVersion.setEncryptionObjectKey(""); modelVersion.setFilePath(""); modelVersion.setEncryptionFilePath(""); + modelVersion.setKeyRate(""); + //模型字典 0 工作流字典 1 Integer type = 0; //校验是否收藏 From 500ff7f3d3a0fbb8fa4406df5b7f133c3055908e Mon Sep 17 00:00:00 2001 From: Diyu0904 <1819728964@qq.com> Date: Fri, 21 Mar 2025 16:12:22 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=8A=B6=E6=80=81=E7=A0=81=E4=B8=BA12202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../interceptor/RepeatSubmitInterceptor.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/mcwl-framework/src/main/java/com/mcwl/framework/interceptor/RepeatSubmitInterceptor.java b/mcwl-framework/src/main/java/com/mcwl/framework/interceptor/RepeatSubmitInterceptor.java index 240bc27..55bd4a7 100644 --- a/mcwl-framework/src/main/java/com/mcwl/framework/interceptor/RepeatSubmitInterceptor.java +++ b/mcwl-framework/src/main/java/com/mcwl/framework/interceptor/RepeatSubmitInterceptor.java @@ -1,15 +1,17 @@ package com.mcwl.framework.interceptor; -import java.lang.reflect.Method; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import com.alibaba.fastjson2.JSON; +import com.mcwl.common.annotation.RepeatSubmit; +import com.mcwl.common.constant.HttpStatus; +import com.mcwl.common.core.domain.AjaxResult; +import com.mcwl.common.utils.ServletUtils; import org.springframework.stereotype.Component; import org.springframework.web.method.HandlerMethod; import org.springframework.web.servlet.HandlerInterceptor; -import com.alibaba.fastjson2.JSON; -import com.mcwl.common.annotation.RepeatSubmit; -import com.mcwl.common.core.domain.AjaxResult; -import com.mcwl.common.utils.ServletUtils; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.lang.reflect.Method; /** * 防止重复提交拦截器 @@ -31,7 +33,7 @@ public abstract class RepeatSubmitInterceptor implements HandlerInterceptor { if (this.isRepeatSubmit(request, annotation)) { - AjaxResult ajaxResult = AjaxResult.error(annotation.message()); + AjaxResult ajaxResult = AjaxResult.error(HttpStatus.SHOW_ERROR_MSG,annotation.message()); ServletUtils.renderString(response, JSON.toJSONString(ajaxResult)); return false; } From 96141843ef1b4f31beb9a944373602ad1cb8e1f2 Mon Sep 17 00:00:00 2001 From: Diyu0904 <1819728964@qq.com> Date: Sat, 22 Mar 2025 15:36:29 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=BAPOST=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/resource/FileController.java | 11 ++++---- .../com/mcwl/resource/domain/vo/FileVo.java | 28 +++++++++++++++++++ 2 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 mcwl-resource/src/main/java/com/mcwl/resource/domain/vo/FileVo.java diff --git a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/FileController.java b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/FileController.java index 7b2cc69..c587893 100644 --- a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/FileController.java +++ b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/FileController.java @@ -4,6 +4,7 @@ import com.mcwl.common.core.domain.AjaxResult; import com.mcwl.common.core.domain.R; import com.mcwl.common.utils.obs.ObsUtils; import com.mcwl.resource.domain.request.RequestFile; +import com.mcwl.resource.domain.vo.FileVo; import com.mcwl.resource.service.impl.FileServiceImpl; import com.mcwl.web.controller.common.OssUtil; import com.obs.services.ObsClient; @@ -115,22 +116,20 @@ public class FileController { /** * 根据文件名查找是否存在 - * @param name - * @param type * @return */ @GetMapping("/selectFileName") @ApiOperation(value = "根据文件名查找是否存在并返回秘钥") - public AjaxResult selectFileName(@RequestParam String name,String type){ + public AjaxResult selectFileName(@RequestBody FileVo fileVo){ - return fileService.selectFileName(name,type); + return fileService.selectFileName(fileVo.getName(), fileVo.getType()); } @GetMapping("/selectFile") @ApiOperation(value = "根据文件名查找是否存在") - public AjaxResult selectFile(@RequestParam String name,String type){ + public AjaxResult selectFile(@RequestBody FileVo fileVo){ - return fileService.selectFile(name,type); + return fileService.selectFile(fileVo.getName(), fileVo.getType()); } @GetMapping("/download") diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/domain/vo/FileVo.java b/mcwl-resource/src/main/java/com/mcwl/resource/domain/vo/FileVo.java new file mode 100644 index 0000000..5934231 --- /dev/null +++ b/mcwl-resource/src/main/java/com/mcwl/resource/domain/vo/FileVo.java @@ -0,0 +1,28 @@ +package com.mcwl.resource.domain.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 根据文件名校验入参 + * + * @author DaiZibo + * @date 2025/3/22 + * @apiNote + */ + + +@NoArgsConstructor +@AllArgsConstructor +@Data +public class FileVo { + + @ApiModelProperty("文件名字") + private String name; + + @ApiModelProperty("文件类型 model/workflow") + private String type; + +}