From 7b75e6ac6902939985483fc3beeda96c65e765eb Mon Sep 17 00:00:00 2001 From: xupei Date: Wed, 9 Apr 2025 09:48:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=89=80=E6=9C=89=E5=A7=BF?= =?UTF-8?q?=E5=8A=BF=E5=8F=98=E6=8D=A2=E7=9A=84pose?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ai/da/controller/GenerateController.java | 4 +++- src/main/java/com/ai/da/service/GenerateService.java | 2 +- .../java/com/ai/da/service/impl/GenerateServiceImpl.java | 9 ++++++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/ai/da/controller/GenerateController.java b/src/main/java/com/ai/da/controller/GenerateController.java index 0d149a9f..bfa8a259 100644 --- a/src/main/java/com/ai/da/controller/GenerateController.java +++ b/src/main/java/com/ai/da/controller/GenerateController.java @@ -14,6 +14,8 @@ import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import javax.validation.Valid; import java.util.List; +import java.util.Map; + /** * @author XP */ @@ -139,7 +141,7 @@ public class GenerateController { @ApiOperation(value = "获取pose transfer的所有pose") @GetMapping("/getAllPose") - public Response> getAllPose(){ + public Response>> getAllPose(){ return Response.success(generateService.getAllPose()); } diff --git a/src/main/java/com/ai/da/service/GenerateService.java b/src/main/java/com/ai/da/service/GenerateService.java index 140cbdb6..6df815ce 100644 --- a/src/main/java/com/ai/da/service/GenerateService.java +++ b/src/main/java/com/ai/da/service/GenerateService.java @@ -62,5 +62,5 @@ public interface GenerateService extends IService { SketchReconstructionVO getSketchReconstruction(Long projectId); - List getAllPose(); + List> getAllPose(); } diff --git a/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java b/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java index 840cbd05..f9d22559 100644 --- a/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java @@ -1193,10 +1193,13 @@ public class GenerateServiceImpl extends ServiceImpl i return vo; } - public List getAllPose(){ + public List> getAllPose(){ String posePath = "aida-sys-image/pose/pose-1.gif"; - String preSignedUrl = minioUtil.getPreSignedUrl(posePath, CommonConstant.MINIO_IMAGE_EXPIRE_TIME); - return Arrays.asList(preSignedUrl); + String firstFramePath = "aida-sys-image/pose/pose-1-first_frame.jpeg"; + HashMap resp = new HashMap<>(); + resp.put("gif", minioUtil.getPreSignedUrl(posePath, CommonConstant.MINIO_IMAGE_EXPIRE_TIME)); + resp.put("firstFrame", minioUtil.getPreSignedUrl(firstFramePath, CommonConstant.MINIO_IMAGE_EXPIRE_TIME)); + return Arrays.asList(resp); } }