Merge remote-tracking branch 'origin/dev-ltx' into dev/3.1_release_merge

This commit is contained in:
2025-09-17 15:34:36 +08:00
2 changed files with 11 additions and 4 deletions

View File

@@ -1738,7 +1738,7 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
private void processParentId(PoseTransformationVO vo, PoseTransformation poseTransformation) { private void processParentId(PoseTransformationVO vo, PoseTransformation poseTransformation) {
if (poseTransformation != null) { if (poseTransformation != null) {
ToProductImageResult productResult = getProductResultByPath(poseTransformation.getProductImage()); ToProductImageResult productResult = getProductResultByPath(poseTransformation);
if (productResult != null) { if (productResult != null) {
Long parentId = collectionSortService.getParentIdByElementIdAndElementType( Long parentId = collectionSortService.getParentIdByElementIdAndElementType(
productResult.getId(), CollectionType.TO_PRODUCT_IMAGE.getValue()); 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<>(); 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); return toProductImageResultMapper.selectOne(qw);
} }

View File

@@ -467,7 +467,7 @@ public class PortfolioServiceImpl extends ServiceImpl<PortfolioMapper, Portfolio
if (Objects.nonNull(query.getOrganizationId())) { if (Objects.nonNull(query.getOrganizationId())) {
qw.eq("organization_id", query.getOrganizationId()); qw.eq("organization_id", query.getOrganizationId());
} else if (query.getGetMyPortfolio() == 0) { } else if (query.getGetMyPortfolio() == 0) {
qw.isNull("is_public").or().eq("is_public", 1); qw.eq("is_public", 1);
} }
/*List<Portfolio> topThree = new ArrayList<>(); /*List<Portfolio> topThree = new ArrayList<>();
@@ -742,6 +742,11 @@ public class PortfolioServiceImpl extends ServiceImpl<PortfolioMapper, Portfolio
.collect(Collectors.groupingBy(userLikeSnapshot -> userLikeSnapshot.getDesignItem().getDesignId())); .collect(Collectors.groupingBy(userLikeSnapshot -> userLikeSnapshot.getDesignItem().getDesignId()));
userLikeMapByDesignId.forEach((designId, userLikeListOld1) -> { userLikeMapByDesignId.forEach((designId, userLikeListOld1) -> {
Design design = designMapper.selectById(designId); Design design = designMapper.selectById(designId);
//数据库中存在designId为-1的情况此处值从workspace里取
if (design == null) {
design = new Design();
design.setSystemScale(BigDecimal.valueOf(workspaceOld.getSystemDesignerPercentage()).movePointLeft(2));
}
design.setId(null); design.setId(null);
design.setCollectionId(collectionIdNew); design.setCollectionId(collectionIdNew);
design.setAccountId(accountId); design.setAccountId(accountId);