fix:增加projectID匹配,避免因为二创导致查询到多条记录
This commit is contained in:
@@ -1738,7 +1738,7 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
|
||||
|
||||
private void processParentId(PoseTransformationVO vo, PoseTransformation poseTransformation) {
|
||||
if (poseTransformation != null) {
|
||||
ToProductImageResult productResult = getProductResultByPath(poseTransformation.getProductImage());
|
||||
ToProductImageResult productResult = getProductResultByPath(poseTransformation);
|
||||
if (productResult != null) {
|
||||
Long parentId = collectionSortService.getParentIdByElementIdAndElementType(
|
||||
productResult.getId(), CollectionType.TO_PRODUCT_IMAGE.getValue());
|
||||
@@ -1770,9 +1770,11 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
|
||||
}
|
||||
}
|
||||
|
||||
private ToProductImageResult getProductResultByPath(String minioPath) {
|
||||
private ToProductImageResult getProductResultByPath(PoseTransformation poseTransformation) {
|
||||
QueryWrapper<ToProductImageResult> qw = new QueryWrapper<>();
|
||||
qw.lambda().eq(ToProductImageResult::getUrl, minioPath);
|
||||
//增加projectID匹配,避免因为二创导致查询到多条记录
|
||||
qw.lambda().eq(ToProductImageResult::getProjectId, poseTransformation.getProjectId());
|
||||
qw.lambda().eq(ToProductImageResult::getUrl, poseTransformation.getUniqueId());
|
||||
return toProductImageResultMapper.selectOne(qw);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user