BUGFIX: 模特删除校验;

TASK: 多语言;
This commit is contained in:
shahaibo
2023-11-07 11:32:03 +08:00
parent bb1c56182e
commit 008d0d626e
7 changed files with 93 additions and 14 deletions

View File

@@ -123,17 +123,7 @@ public class LibraryController {
@ApiOperation(value = "批量删除library")
@PostMapping("/batchDeleteLibrary")
public Response<Boolean> batchDeleteLibrary(@Valid @RequestBody LibraryDeleteDTO deleteDTO) {
List<Library> librarys = libraryService.getByIds(deleteDTO.getLibraryIds());
if (CollectionUtils.isEmpty(librarys)) {
throw new BusinessException("librarys.not.found");
}
libraryService.removeBatchByIds(deleteDTO.getLibraryIds());
for (Library library : librarys) {
if (library.getUrl().startsWith(sysImage)) {
continue;
}
minioUtil.deleteObject(library.getUrl());
}
libraryService.batchDeleteLibrary(deleteDTO);
return Response.success(Boolean.TRUE);
}