收藏bug

This commit is contained in:
caozhen
2023-09-18 14:28:43 +08:00
parent 32ceaed0b0
commit 0508052d22
@@ -66,7 +66,7 @@ public class LawsStandardCollectionController extends JeroController<LawsStandar
LambdaQueryWrapper<LawsStandardCollection> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(LawsStandardCollection::getStandardId, lawsStandardCollection.getStandardId());
wrapper.eq(LawsStandardCollection::getCollectorId, sysUser.getId());
int count = lawsStandardCollectionService.count();
int count = lawsStandardCollectionService.count(wrapper);
if (count > 0){
return Result.error(MessageUtils.getMessage(ResultCommon.CANNOT_DUPLICATE_FAVORITES));
}
@@ -101,7 +101,7 @@ public class LawsStandardCollectionController extends JeroController<LawsStandar
LambdaQueryWrapper<LawsStandardCollection> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(LawsStandardCollection::getStandardId, lawsStandardCollection.getStandardId());
wrapper.eq(LawsStandardCollection::getCollectorId, sysUser.getId());
int count = lawsStandardCollectionService.count();
int count = lawsStandardCollectionService.count(wrapper);
if (count > 0){
return Result.error(MessageUtils.getMessage(ResultCommon.CANNOT_DUPLICATE_FAVORITES));
}
@@ -136,7 +136,7 @@ public class LawsStandardCollectionController extends JeroController<LawsStandar
LambdaQueryWrapper<LawsStandardCollection> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(LawsStandardCollection::getStandardId, lawsStandardCollection.getStandardId());
wrapper.eq(LawsStandardCollection::getCollectorId, sysUser.getId());
int count = lawsStandardCollectionService.count();
int count = lawsStandardCollectionService.count(wrapper);
if (count > 0){
return Result.error(MessageUtils.getMessage(ResultCommon.CANNOT_DUPLICATE_FAVORITES));
}