TASK:collection sort;
This commit is contained in:
@@ -1332,14 +1332,16 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
qw.lambda().orderByDesc(CollectionSort::getSort);
|
qw.lambda().orderByDesc(CollectionSort::getSort);
|
||||||
List<CollectionSort> userLikeSorts = collectionSortMapper.selectList(qw);
|
List<CollectionSort> userLikeSorts = collectionSortMapper.selectList(qw);
|
||||||
CollectionSort userLikeSort = getUserLikeSortByUserLikeId(relationId, relationType, projectId);
|
CollectionSort userLikeSort = getUserLikeSortByUserLikeId(relationId, relationType, projectId);
|
||||||
Long userLikeSortId = userLikeSort.getId();
|
if (Objects.nonNull(userLikeSort)) {
|
||||||
for (CollectionSort likeSort : userLikeSorts) {
|
Long userLikeSortId = userLikeSort.getId();
|
||||||
if (Objects.equals(likeSort.getId(), userLikeSortId)) {
|
for (CollectionSort likeSort : userLikeSorts) {
|
||||||
collectionSortMapper.deleteById(likeSort);
|
if (Objects.equals(likeSort.getId(), userLikeSortId)) {
|
||||||
break;
|
collectionSortMapper.deleteById(likeSort);
|
||||||
}else {
|
break;
|
||||||
likeSort.setSort(likeSort.getSort() - 1);
|
}else {
|
||||||
collectionSortMapper.updateById(likeSort);
|
likeSort.setSort(likeSort.getSort() - 1);
|
||||||
|
collectionSortMapper.updateById(likeSort);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user