BUGFIX: 代码优化;

This commit is contained in:
shahaibo
2023-10-19 16:12:42 +08:00
parent 201b188579
commit f18c27fe02
6 changed files with 29 additions and 11 deletions

View File

@@ -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());