Merge remote-tracking branch 'origin/dev-ltx' into dev/3.1_release_merge
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -467,7 +467,7 @@ public class PortfolioServiceImpl extends ServiceImpl<PortfolioMapper, Portfolio
|
||||
if (Objects.nonNull(query.getOrganizationId())) {
|
||||
qw.eq("organization_id", query.getOrganizationId());
|
||||
} else if (query.getGetMyPortfolio() == 0) {
|
||||
qw.isNull("is_public").or().eq("is_public", 1);
|
||||
qw.eq("is_public", 1);
|
||||
}
|
||||
|
||||
/*List<Portfolio> topThree = new ArrayList<>();
|
||||
@@ -742,6 +742,11 @@ public class PortfolioServiceImpl extends ServiceImpl<PortfolioMapper, Portfolio
|
||||
.collect(Collectors.groupingBy(userLikeSnapshot -> userLikeSnapshot.getDesignItem().getDesignId()));
|
||||
userLikeMapByDesignId.forEach((designId, userLikeListOld1) -> {
|
||||
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.setCollectionId(collectionIdNew);
|
||||
design.setAccountId(accountId);
|
||||
|
||||
Reference in New Issue
Block a user