从统一接口获取pose transformation的生成记录
This commit is contained in:
@@ -30,7 +30,7 @@ public class ModuleChooseVO {
|
|||||||
private CavasModuleChooseVO canvas;
|
private CavasModuleChooseVO canvas;
|
||||||
|
|
||||||
private List<CollectionSketchVO> boundingBox;
|
private List<CollectionSketchVO> boundingBox;
|
||||||
// private moodBoardModuleChooseVO poseTransfer;
|
private List<PoseTransformationVO> poseTransfer;
|
||||||
// private moodBoardModuleChooseVO patternMaking3D;
|
// private moodBoardModuleChooseVO patternMaking3D;
|
||||||
private SketchReconstructionVO deReconstruction;
|
private SketchReconstructionVO deReconstruction;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ public class PoseTransformationVO {
|
|||||||
|
|
||||||
private String taskId;
|
private String taskId;
|
||||||
|
|
||||||
|
private String productImage;
|
||||||
|
|
||||||
private String gifUrl;
|
private String gifUrl;
|
||||||
|
|
||||||
private String videoUrl;
|
private String videoUrl;
|
||||||
@@ -22,4 +24,14 @@ public class PoseTransformationVO {
|
|||||||
private byte isLiked;
|
private byte isLiked;
|
||||||
|
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
public PoseTransformationVO(Long id, String taskId, String gifUrl, String videoUrl, String firstFrameUrl, byte isLiked, String status) {
|
||||||
|
this.id = id;
|
||||||
|
this.taskId = taskId;
|
||||||
|
this.gifUrl = gifUrl;
|
||||||
|
this.videoUrl = videoUrl;
|
||||||
|
this.firstFrameUrl = firstFrameUrl;
|
||||||
|
this.isLiked = isLiked;
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public interface GenerateService extends IService<Generate> {
|
|||||||
|
|
||||||
PoseTransformationVO getPoseTransformationResult(String taskId);
|
PoseTransformationVO getPoseTransformationResult(String taskId);
|
||||||
|
|
||||||
List<PoseTransformationVO> getPoseTransformationResultList(String projectId);
|
List<PoseTransformationVO> getPoseTransformationResultList(Long projectId);
|
||||||
|
|
||||||
Boolean disOrLikePose(Long transformedId, String likeOrDislike);
|
Boolean disOrLikePose(Long transformedId, String likeOrDislike);
|
||||||
|
|
||||||
|
|||||||
@@ -1018,13 +1018,18 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<PoseTransformationVO> getPoseTransformationResultList(String projectId){
|
public List<PoseTransformationVO> getPoseTransformationResultList(Long projectId){
|
||||||
List<PoseTransformation> poseTransformations = poseTransformationMapper.selectList(new QueryWrapper<PoseTransformation>().eq("project_id", projectId).eq("is_liked", 1));
|
List<PoseTransformation> poseTransformations = poseTransformationMapper.selectList(new QueryWrapper<PoseTransformation>().eq("project_id", projectId).eq("is_liked", 1));
|
||||||
List<PoseTransformationVO> vos = new ArrayList<>();
|
List<PoseTransformationVO> vos = new ArrayList<>();
|
||||||
if (poseTransformations != null && poseTransformations.size() > 1){
|
if (poseTransformations != null && poseTransformations.size() > 1){
|
||||||
poseTransformations.forEach(item -> {
|
poseTransformations.forEach(item -> {
|
||||||
PoseTransformationVO poseTransformationVO = CopyUtil.copyObject(item, PoseTransformationVO.class);
|
PoseTransformationVO poseTransformationVO = new PoseTransformationVO();
|
||||||
poseTransformationVO.setId(item.getId());
|
poseTransformationVO.setId(item.getId());
|
||||||
|
poseTransformationVO.setProductImage(minioUtil.getPreSignedUrl(item.getProductImage(), CommonConstant.MINIO_IMAGE_EXPIRE_TIME));
|
||||||
|
poseTransformationVO.setGifUrl(minioUtil.getPreSignedUrl(item.getGifUrl(), CommonConstant.MINIO_IMAGE_EXPIRE_TIME));
|
||||||
|
poseTransformationVO.setVideoUrl(minioUtil.getPreSignedUrl(item.getVideoUrl(), CommonConstant.MINIO_IMAGE_EXPIRE_TIME));
|
||||||
|
poseTransformationVO.setFirstFrameUrl(minioUtil.getPreSignedUrl(item.getFirstFrameUrl(), CommonConstant.MINIO_IMAGE_EXPIRE_TIME));
|
||||||
|
poseTransformationVO.setIsLiked(item.getIsLiked());
|
||||||
vos.add(poseTransformationVO);
|
vos.add(poseTransformationVO);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1549,6 +1549,9 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
|||||||
}else if (module.equals(Module.deReconstruction.name())){
|
}else if (module.equals(Module.deReconstruction.name())){
|
||||||
SketchReconstructionVO sketchReconstruction = generateService.getSketchReconstruction(projectDTO.getId());
|
SketchReconstructionVO sketchReconstruction = generateService.getSketchReconstruction(projectDTO.getId());
|
||||||
moduleChooseVO.setDeReconstruction(sketchReconstruction);
|
moduleChooseVO.setDeReconstruction(sketchReconstruction);
|
||||||
|
}else if (module.equals(Module.poseTransfer.name())){
|
||||||
|
List<PoseTransformationVO> poseTransformationResultList = generateService.getPoseTransformationResultList(projectDTO.getId());
|
||||||
|
moduleChooseVO.setPoseTransfer(poseTransformationResultList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return moduleChooseVO;
|
return moduleChooseVO;
|
||||||
|
|||||||
Reference in New Issue
Block a user