fix:78587

This commit is contained in:
梁琦涛
2023-11-23 09:21:20 +08:00
parent 4f6c7a11fb
commit 115b8d57af
5 changed files with 13 additions and 4 deletions
@@ -210,6 +210,15 @@ public class LawsStandardCollectionController extends JeroController<LawsStandar
if(!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))){
throw new JeroBootException(ResultCommon.PLEASE_SELECT_DATA);
}
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
LambdaQueryWrapper<LawsStandardCollection> queryLawsStandardCollection = new LambdaQueryWrapper<>();
queryLawsStandardCollection.eq(LawsStandardCollection::getId,map.get("id"));
queryLawsStandardCollection.ne(LawsStandardCollection::getCollectorId,sysUser);
long l = lawsStandardCollectionService.count(queryLawsStandardCollection);
if(l > 0){
throw new JeroBootException(ResultCommon.HORIZONTAL_TRANSGRESSION);
}
lawsStandardCollectionService.removeById(map.get("id"));
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
}