diff --git a/src/main/java/com/ai/da/controller/GenerateController.java b/src/main/java/com/ai/da/controller/GenerateController.java index c5ecd7f7..a928720a 100644 --- a/src/main/java/com/ai/da/controller/GenerateController.java +++ b/src/main/java/com/ai/da/controller/GenerateController.java @@ -149,7 +149,7 @@ public class GenerateController { @Operation(summary = "获取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 e321d79d..7e66a14d 100644 --- a/src/main/java/com/ai/da/service/GenerateService.java +++ b/src/main/java/com/ai/da/service/GenerateService.java @@ -73,7 +73,7 @@ public interface GenerateService extends IService { SketchReconstructionVO getSketchReconstruction(Long projectId); - List> getAllPose(); + List> getAllPose(); void processPoseTransformResultBatch(String taskId, String gifUrl, String videoUrl, String imageUrl, String progress); 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 a3235f5c..dd8fc6ad 100644 --- a/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java @@ -3090,14 +3090,19 @@ public class GenerateServiceImpl extends ServiceImpl i return vo; } - public List> getAllPose() { + public List> getAllPose() { List> propertyList = PoseEnum.getPropertyList(); + List> resp = new ArrayList<>(); propertyList.forEach(item -> { + HashMap temp = new HashMap<>(); + // item.put("gif", minioUtil.getPreSignedUrl(item.get("gif"), CommonConstant.MINIO_IMAGE_EXPIRE_TIME)); - item.put("video", minioUtil.getPreSignedUrl(item.get("video"), CommonConstant.MINIO_IMAGE_EXPIRE_TIME)); - item.put("firstFrame", minioUtil.getPreSignedUrl(item.get("firstFrame"), CommonConstant.MINIO_IMAGE_EXPIRE_TIME)); + temp.put("id", Integer.parseInt(item.get("id"))); + temp.put("video", minioUtil.getPreSignedUrl(item.get("video"), CommonConstant.MINIO_IMAGE_EXPIRE_TIME)); + temp.put("firstFrame", minioUtil.getPreSignedUrl(item.get("firstFrame"), CommonConstant.MINIO_IMAGE_EXPIRE_TIME)); + resp.add(temp); }); - return propertyList; + return resp; } @Override