TASK:collection sort;
This commit is contained in:
@@ -1313,9 +1313,6 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
//修改designItem为dislike状态
|
//修改designItem为dislike状态
|
||||||
designItemService.updateLikeStatus(userLike.getDesignItemId(), (byte) 0);
|
designItemService.updateLikeStatus(userLike.getDesignItemId(), (byte) 0);
|
||||||
//删除关联的collection,先不做
|
//删除关联的collection,先不做
|
||||||
|
|
||||||
//删除对应的history
|
|
||||||
userLikeService.removeById(disDesignLikeDTO.getGroupDetailId());
|
|
||||||
List<UserLikeVO> userLikeVOS = userLikeService.getGroupDetail(userLike.getUserLikeGroupId());
|
List<UserLikeVO> userLikeVOS = userLikeService.getGroupDetail(userLike.getUserLikeGroupId());
|
||||||
if (CollectionUtils.isEmpty(userLikeVOS)) {
|
if (CollectionUtils.isEmpty(userLikeVOS)) {
|
||||||
//group 下面没有元素时候 直接删除
|
//group 下面没有元素时候 直接删除
|
||||||
@@ -1323,6 +1320,8 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
deleteCollectionSort(userLike.getId(), CollectionType.DESIGN.getValue(), disDesignLikeDTO.getProjectId());
|
deleteCollectionSort(userLike.getId(), CollectionType.DESIGN.getValue(), disDesignLikeDTO.getProjectId());
|
||||||
|
//删除对应的history
|
||||||
|
userLikeService.removeById(disDesignLikeDTO.getGroupDetailId());
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -782,15 +782,16 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
|||||||
@Override
|
@Override
|
||||||
public Boolean productImageUnLike(ProductImageLikeDTO productImageLikeDTO) {
|
public Boolean productImageUnLike(ProductImageLikeDTO productImageLikeDTO) {
|
||||||
List<Long> toProductImageResultId = productImageLikeDTO.getToProductImageResultId();
|
List<Long> toProductImageResultId = productImageLikeDTO.getToProductImageResultId();
|
||||||
QueryWrapper<ToProductImageResult> qw = new QueryWrapper<>();
|
if (!CollectionUtils.isEmpty(toProductImageResultId)) {
|
||||||
qw.lambda().in(ToProductImageResult::getId, toProductImageResultId);
|
Long toProductImageId = toProductImageResultId.get(0);
|
||||||
ToProductImageResult toProductImageResult = new ToProductImageResult();
|
ToProductImageResult toProductImageResult = toProductImageResultMapper.selectById(toProductImageId);
|
||||||
toProductImageResult.setIsLike(0);
|
toProductImageResult.setIsLike(0);
|
||||||
toProductImageResultMapper.update(toProductImageResult, qw);
|
toProductImageResultMapper.updateById(toProductImageResult);
|
||||||
if (toProductImageResult.getResultType().equals("Relight")) {
|
if (toProductImageResult.getResultType().equals("Relight")) {
|
||||||
designService.deleteCollectionSort(toProductImageResult.getId(), CollectionType.RELIGHT.getValue(), productImageLikeDTO.getProjectId());
|
designService.deleteCollectionSort(toProductImageResult.getId(), CollectionType.RELIGHT.getValue(), productImageLikeDTO.getProjectId());
|
||||||
}else {
|
}else {
|
||||||
designService.deleteCollectionSort(toProductImageResult.getId(), CollectionType.TO_PRODUCT_IMAGE.getValue(), productImageLikeDTO.getProjectId());
|
designService.deleteCollectionSort(toProductImageResult.getId(), CollectionType.TO_PRODUCT_IMAGE.getValue(), productImageLikeDTO.getProjectId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user