BUGFIX: 模特删除校验;
TASK: 多语言;
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user