BUGFIX: 代码优化;
This commit is contained in:
@@ -22,6 +22,7 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -50,6 +51,9 @@ public class LibraryController {
|
||||
@Resource
|
||||
private MinioUtil minioUtil;
|
||||
|
||||
@Value("${minio.bucketName.sysImage}")
|
||||
private String sysImage;
|
||||
|
||||
@ApiOperation(value = "Library分页列表")
|
||||
@PostMapping("/queryLibraryPage")
|
||||
public Response<PageBaseResponse<QueryLibraryPageVO>> queryLibraryPage(@Valid @RequestBody QueryLibraryPageDTO query) {
|
||||
@@ -118,7 +122,7 @@ public class LibraryController {
|
||||
Assert.notEmpty(librarys,"librarys does not exist!");
|
||||
libraryService.removeBatchByIds(deleteDTO.getLibraryIds());
|
||||
for (Library library : librarys) {
|
||||
if (library.getUrl().startsWith("aida-sys-image")) {
|
||||
if (library.getUrl().startsWith(sysImage)) {
|
||||
continue;
|
||||
}
|
||||
minioUtil.deleteObject(library.getUrl());
|
||||
|
||||
Reference in New Issue
Block a user