Compare commits

..

No commits in common. "619bc45f1780814e05aab15d5a5cef6a6a21c58f" and "c9637b5ae63a1c9c58dc0f563b3b79c8156efd8a" have entirely different histories.

4 changed files with 16 additions and 50 deletions

View File

@ -4,7 +4,6 @@ import com.mcwl.common.core.domain.AjaxResult;
import com.mcwl.common.core.domain.R; import com.mcwl.common.core.domain.R;
import com.mcwl.common.utils.obs.ObsUtils; import com.mcwl.common.utils.obs.ObsUtils;
import com.mcwl.resource.domain.request.RequestFile; import com.mcwl.resource.domain.request.RequestFile;
import com.mcwl.resource.domain.vo.FileVo;
import com.mcwl.resource.service.impl.FileServiceImpl; import com.mcwl.resource.service.impl.FileServiceImpl;
import com.mcwl.web.controller.common.OssUtil; import com.mcwl.web.controller.common.OssUtil;
import com.obs.services.ObsClient; import com.obs.services.ObsClient;
@ -116,20 +115,22 @@ public class FileController {
/** /**
* *
* @param name
* @param type
* @return * @return
*/ */
@PostMapping("/selectFileName") @GetMapping("/selectFileName")
@ApiOperation(value = "根据文件名查找是否存在并返回秘钥") @ApiOperation(value = "根据文件名查找是否存在并返回秘钥")
public AjaxResult selectFileName(@RequestBody FileVo fileVo){ public AjaxResult selectFileName(@RequestParam String name,String type){
return fileService.selectFileName(fileVo.getName(), fileVo.getType()); return fileService.selectFileName(name,type);
} }
@PostMapping("/selectFile") @GetMapping("/selectFile")
@ApiOperation(value = "根据文件名查找是否存在") @ApiOperation(value = "根据文件名查找是否存在")
public AjaxResult selectFile(@RequestBody FileVo fileVo){ public AjaxResult selectFile(@RequestParam String name,String type){
return fileService.selectFile(fileVo.getName(), fileVo.getType()); return fileService.selectFile(name,type);
} }
@GetMapping("/download") @GetMapping("/download")

View File

@ -1,17 +1,15 @@
package com.mcwl.framework.interceptor; package com.mcwl.framework.interceptor;
import com.alibaba.fastjson2.JSON; import java.lang.reflect.Method;
import com.mcwl.common.annotation.RepeatSubmit; import javax.servlet.http.HttpServletRequest;
import com.mcwl.common.constant.HttpStatus; import javax.servlet.http.HttpServletResponse;
import com.mcwl.common.core.domain.AjaxResult;
import com.mcwl.common.utils.ServletUtils;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.web.method.HandlerMethod; import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.HandlerInterceptor;
import com.alibaba.fastjson2.JSON;
import javax.servlet.http.HttpServletRequest; import com.mcwl.common.annotation.RepeatSubmit;
import javax.servlet.http.HttpServletResponse; import com.mcwl.common.core.domain.AjaxResult;
import java.lang.reflect.Method; import com.mcwl.common.utils.ServletUtils;
/** /**
* *
@ -33,7 +31,7 @@ public abstract class RepeatSubmitInterceptor implements HandlerInterceptor
{ {
if (this.isRepeatSubmit(request, annotation)) if (this.isRepeatSubmit(request, annotation))
{ {
AjaxResult ajaxResult = AjaxResult.error(HttpStatus.SHOW_ERROR_MSG,annotation.message()); AjaxResult ajaxResult = AjaxResult.error(annotation.message());
ServletUtils.renderString(response, JSON.toJSONString(ajaxResult)); ServletUtils.renderString(response, JSON.toJSONString(ajaxResult));
return false; return false;
} }

View File

@ -1,28 +0,0 @@
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;
}

View File

@ -100,14 +100,9 @@ public class ModelVersionServiceImpl extends ServiceImpl< ModelVersionMapper,Mo
Long userIdMax = SecurityUtils.getUserIdMax(); Long userIdMax = SecurityUtils.getUserIdMax();
if (userIdMax != 0){ if (userIdMax != 0){
//擦掉敏感数据
for (ModelVersion modelVersion : modelVersions) { for (ModelVersion modelVersion : modelVersions) {
modelVersion.setObjectKey("");
modelVersion.setEncryptionObjectKey("");
modelVersion.setFilePath(""); modelVersion.setFilePath("");
modelVersion.setEncryptionFilePath(""); modelVersion.setEncryptionFilePath("");
modelVersion.setKeyRate("");
//模型字典 0 工作流字典 1 //模型字典 0 工作流字典 1
Integer type = 0; Integer type = 0;
//校验是否收藏 //校验是否收藏