修改查询文件为POST请求
parent
500ff7f3d3
commit
96141843ef
|
@ -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")
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
Loading…
Reference in New Issue