TASK:product/pose transfer的回参添加sort和id

This commit is contained in:
2025-07-08 10:21:28 +08:00
parent 9fc8f52aca
commit 060db899cf
4 changed files with 10 additions and 19 deletions

View File

@@ -1189,11 +1189,9 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
private Integer addPoseTransferLike(PoseTransformDTO poseTransformDTO, Long poseTransformationId){
if (Objects.nonNull(poseTransformDTO.getParentId())
&& !poseTransformDTO.getParentId().equals(0L)){
Object object = disOrLikePose(poseTransformationId, "like",
CollectionSort collectionSort = disOrLikePose(poseTransformationId, "like",
poseTransformDTO.getProjectId(), poseTransformDTO.getParentId());
if (object instanceof CollectionSort){
return ((CollectionSort) object).getSort();
}
return collectionSort.getSort();
}
return null;
}
@@ -1335,7 +1333,7 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
}
}
public Object disOrLikePose(Long transformedId, String likeOrDislike, Long projectId, Long collectionSortParentId){
public CollectionSort disOrLikePose(Long transformedId, String likeOrDislike, Long projectId, Long collectionSortParentId){
PoseTransformation poseTransformation = poseTransformationMapper.selectById(transformedId);
CollectionSort collectionSort = null;
if (Objects.nonNull(poseTransformation)){
@@ -1352,14 +1350,11 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
}
poseTransformation.setUpdateTime(LocalDateTime.now());
poseTransformationMapper.updateById(poseTransformation);
}else {
return false;
}
if (Objects.nonNull(collectionSort)) {
projectService.modifyProjectUpdateTime(projectId);
return collectionSort;
}
return true;
return collectionSort;
}
@Resource