fix:78587
This commit is contained in:
+9
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user