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

This commit is contained in:
litianxiang
2025-12-17 15:40:47 +08:00
parent eb3826927d
commit 6a8c87ed95

View File

@@ -1534,8 +1534,7 @@ 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()).orderByDesc(CollectionSort::getSort).last("LIMIT 1"));
List<CollectionSort> collectionSorts1 = collectionSortMapper.selectList(new LambdaQueryWrapper<CollectionSort>().eq(CollectionSort::getParentId, collectionSorts.get(0).getParentId()).gt(CollectionSort::getSort, collectionSorts.get(0).getSort()));
if (!collectionSorts1.isEmpty()) {
collectionSorts1.get(0).setSort(collectionSorts1.get(0).getSort() - 1);
collectionSortMapper.updateById(collectionSorts1.get(0));