|
@@ -250,6 +250,11 @@ public class LifeCollectController {
|
|
|
}
|
|
|
wrapper.set(LifeCollect::getDeleteFlag, 1);
|
|
|
int num = lifeCollectMapper.update(null, wrapper);
|
|
|
+
|
|
|
+ if (num == 0) {
|
|
|
+ return R.fail("取消收藏失败");
|
|
|
+ }
|
|
|
+
|
|
|
// 二手交易收藏数量-1
|
|
|
if (StringUtil.isNotBlank(businessType) && businessType.equals("1")) {
|
|
|
// 创建LambdaUpdateWrapper实例用于构建更新条件
|
|
@@ -260,10 +265,6 @@ public class LifeCollectController {
|
|
|
lambdaUpdateWrapper.setSql("collect_count = collect_count - 1");
|
|
|
secondGoodsMapper.update(null, lambdaUpdateWrapper);
|
|
|
}
|
|
|
-
|
|
|
- if (num == 0) {
|
|
|
- return R.fail("取消收藏失败");
|
|
|
- }
|
|
|
return R.success("取消收藏成功");
|
|
|
}
|
|
|
|