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

This commit is contained in:
litianxiang
2025-10-16 11:00:36 +08:00
3 changed files with 9 additions and 5 deletions

View File

@@ -227,8 +227,8 @@ public class CollectionSortServiceImpl extends ServiceImpl<CollectionSortMapper,
}
child.setSort(collectionSort.getSort());
// 原来排序的大于等于userLikeSortId的排序的都要1
// baseMapper.increaseGenerateSortAbove(parentId, /*relationType,*/ collectionSort.getSort() - 1);
resort(collectionSort.getProjectId(), parentId);
baseMapper.increaseGenerateSortAbove(parentId, /*relationType,*/ collectionSort.getSort() - 1);
// resort(collectionSort.getProjectId(), parentId);
// 当前的生成结果则填入userLikeSortId的排序位置
child.setUpdateTime(LocalDateTime.now());
baseMapper.updateById(child);

View File

@@ -521,7 +521,7 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
// 2.2、添加到library
AuthPrincipalVo userInfo = UserContext.getUserHolder();
Long accountId = userInfo.getId();
Library library = setLibrary(accountId, generateLikeDTO, generateDetail.getUrl());
Library library = setLibrary(accountId, generateLikeDTO, generateDetail.getUrl(), generateLikeDTO.getAgeGroup());
libraryService.save(library);
// 3、更新generateDetail表的isLike列和libraryId列
@@ -555,12 +555,13 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
return Boolean.TRUE;
}
public Library setLibrary(Long accountId, GenerateLikeDTO generateLikeDTO, String imageUrl) {
public Library setLibrary(Long accountId, GenerateLikeDTO generateLikeDTO, String imageUrl, String ageGroup) {
Library library = new Library();
library.setAccountId(accountId);
library.setLevel1Type(generateLikeDTO.getLevel1Type());
library.setLevel2Type(StringUtil.isNullOrEmpty(generateLikeDTO.getLevel2Type()) ? null : generateLikeDTO.getLevel2Type());
library.setLevel3Type(StringUtil.isNullOrEmpty(generateLikeDTO.getGender()) ? null : generateLikeDTO.getGender());
library.setAgeGroup(ageGroup);
library.setName(DateUtil.getTimeStamp(generateLikeDTO.getTimeZone()) + "_N_G");
library.setUrl(imageUrl);
try {
@@ -2554,7 +2555,7 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
if (Objects.nonNull(poseTransformDTO.getParentId())
&& !poseTransformDTO.getParentId().equals(0L)) {
return disOrLikePose(poseTransformationId, "like",
poseTransformDTO.getProjectId(), poseTransformDTO.getParentId());
poseTransformDTO.getProjectId(), poseTransformDTO.getUserLikeSortId());
}
return null;
}