feat(img-files): 添加图片文件删除接口

- 新增 getDelete 接口用于删除单个图片文件
- 新增 getIds 接口用于批量删除图片文件
komen
zhaokai 2026-07-22 08:40:45 +08:00
parent 2467f7327e
commit 8ff5a19654
1 changed files with 13 additions and 0 deletions

View File

@ -81,6 +81,19 @@ public class ImgFilesController {
imgFilesService.removeBatch(ids); imgFilesService.removeBatch(ids);
return SingleResponse.buildSuccess(); return SingleResponse.buildSuccess();
} }
@ApiOperation("删除")
@GetMapping("/getDelete")
public Response getDelete(@RequestParam String filePath) {
imgFilesService.removeFile(filePath);
return Response.buildSuccess();
}
@ApiOperation("删除多个")
@GetMapping("/getIds")
public Response getIds(@RequestParam Long[] ids) {
imgFilesService.removeBatch(ids);
return SingleResponse.buildSuccess();
}
@ApiOperation("修改") @ApiOperation("修改")
@PutMapping("/edit") @PutMapping("/edit")