从统一接口获取pose transformation的生成记录
This commit is contained in:
@@ -52,7 +52,7 @@ public interface GenerateService extends IService<Generate> {
|
||||
|
||||
PoseTransformationVO getPoseTransformationResult(String taskId);
|
||||
|
||||
List<PoseTransformationVO> getPoseTransformationResultList(String projectId);
|
||||
List<PoseTransformationVO> getPoseTransformationResultList(Long projectId);
|
||||
|
||||
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<PoseTransformationVO> vos = new ArrayList<>();
|
||||
if (poseTransformations != null && poseTransformations.size() > 1){
|
||||
poseTransformations.forEach(item -> {
|
||||
PoseTransformationVO poseTransformationVO = CopyUtil.copyObject(item, PoseTransformationVO.class);
|
||||
PoseTransformationVO poseTransformationVO = new PoseTransformationVO();
|
||||
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);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1549,6 +1549,9 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
}else if (module.equals(Module.deReconstruction.name())){
|
||||
SketchReconstructionVO sketchReconstruction = generateService.getSketchReconstruction(projectDTO.getId());
|
||||
moduleChooseVO.setDeReconstruction(sketchReconstruction);
|
||||
}else if (module.equals(Module.poseTransfer.name())){
|
||||
List<PoseTransformationVO> poseTransformationResultList = generateService.getPoseTransformationResultList(projectDTO.getId());
|
||||
moduleChooseVO.setPoseTransfer(poseTransformationResultList);
|
||||
}
|
||||
}
|
||||
return moduleChooseVO;
|
||||
|
||||
Reference in New Issue
Block a user