bugfix: parentId结果返回;

This commit is contained in:
shahaibo
2025-06-25 15:52:11 +08:00
parent de65f78e89
commit 84691f45b5

View File

@@ -730,6 +730,8 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
private Long getParentIdByElementIdAndElementType(Long elementId, String elementType) {
QueryWrapper<CollectionSort> qw = new QueryWrapper<>();
qw.lambda().eq(CollectionSort::getRelationId, elementId);
elementType = transElementType(elementType);
qw.lambda().eq(CollectionSort::getRelationType, elementType);
List<CollectionSort> collectionSortList = collectionSortMapper.selectList(qw);
if (CollectionUtils.isEmpty(collectionSortList)) {
@@ -743,6 +745,16 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
return collectionSort.getParentId();
}
private String transElementType(String elementType) {
if (elementType.equals("DesignOutfit")) {
return CollectionType.DESIGN.getValue();
}else if (elementType.equals("ToProductImage")) {
return CollectionType.TO_PRODUCT_IMAGE.getValue();
}else {
return "";
}
}
private MagicToolResultVO processFluxResult(String fluxImgMinioPath, ToProductImageResult toProductImageResult, String taskId){
toProductImageResult.setUrl(fluxImgMinioPath);
toProductImageResultMapper.updateById(toProductImageResult);