增加 删除图片api
This commit is contained in:
parent
d96580d6b1
commit
5764799990
@ -3,15 +3,19 @@ package cn.iocoder.yudao.module.infra.api.file;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.infra.api.file.dto.FileCreateReqDTO;
|
||||
import cn.iocoder.yudao.module.infra.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
|
||||
@Tag(name = "RPC 服务 - 文件")
|
||||
public interface FileApi {
|
||||
@ -76,4 +80,8 @@ public interface FileApi {
|
||||
@RequestParam("name") String name,
|
||||
@RequestBody byte[] content) ;
|
||||
|
||||
@DeleteMapping("/deleteBpmFile")
|
||||
@Operation(summary = "删除工作流附件")
|
||||
@Parameter(name = "url", description = "附件URL地址", required = true)
|
||||
CommonResult<Boolean> deleteBpmFile(@RequestParam("url") String url) throws Exception;
|
||||
}
|
||||
|
@ -51,4 +51,12 @@ public class FileApiImpl implements FileApi {
|
||||
public String updateBusinessFileContent(String url, Long businessType, String name, byte[] content) {
|
||||
return fileService.updateBusinessFileContent(url, businessType, name, content) ;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> deleteBpmFile(String url) throws Exception {
|
||||
|
||||
fileService.deleteFile(url);
|
||||
|
||||
return success(true);
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,8 @@ public class BusinessFileDO extends BaseDO {
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 业务类型 1:日志 2.暂定 3.暂定 4...
|
||||
* 业务类型
|
||||
* 1 日志附件 2 签名附件 3 头像 5 考勤附件 6 人脸照片
|
||||
*/
|
||||
private Long businessType;
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user