BUGFIX:排序优化

This commit is contained in:
2025-10-15 18:03:48 +08:00
parent 4578cb5778
commit 0c227a1efa

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);