Revert "edit 产品图失败会导致sort不对试验5"

This reverts commit 6a8c87ed95.
This commit is contained in:
litianxiang
2025-12-17 15:41:02 +08:00
parent 6a8c87ed95
commit bb1d3bd359

View File

@@ -1534,7 +1534,8 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
if (!collectionSorts.isEmpty()) {
collectionSortMapper.deleteById(collectionSorts.get(0));
List<CollectionSort> collectionSorts1 = collectionSortMapper.selectList(new LambdaQueryWrapper<CollectionSort>().eq(CollectionSort::getParentId, collectionSorts.get(0).getParentId()).gt(CollectionSort::getSort, collectionSorts.get(0).getSort()));
List<CollectionSort> collectionSorts1 = collectionSortMapper.selectList(new LambdaQueryWrapper<CollectionSort>().eq(CollectionSort::getParentId, collectionSorts.get(0).getParentId()).orderByDesc(CollectionSort::getSort).last("LIMIT 1"));
if (!collectionSorts1.isEmpty()) {
collectionSorts1.get(0).setSort(collectionSorts1.get(0).getSort() - 1);
collectionSortMapper.updateById(collectionSorts1.get(0));