fix:78587
This commit is contained in:
+8
@@ -101,6 +101,14 @@ public class LawsBrowsingHistoryController extends JeroController<LawsBrowsingHi
|
|||||||
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
|
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
|
||||||
throw new JeroBootException(ResultCommon.PLEASE_SELECT_DATA);
|
throw new JeroBootException(ResultCommon.PLEASE_SELECT_DATA);
|
||||||
}
|
}
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
|
LambdaQueryWrapper<LawsBrowsingHistory> queryLawsBrowsingHistory = new LambdaQueryWrapper<>();
|
||||||
|
queryLawsBrowsingHistory.ne(LawsBrowsingHistory::getBrowsingUserId,sysUser.getId());
|
||||||
|
queryLawsBrowsingHistory.in(LawsBrowsingHistory::getId,Arrays.asList(map.get("ids").split(",")));
|
||||||
|
long l = lawsBrowsingHistoryService.count(queryLawsBrowsingHistory);
|
||||||
|
if(l > 0){
|
||||||
|
throw new JeroBootException(ResultCommon.HORIZONTAL_TRANSGRESSION);
|
||||||
|
}
|
||||||
this.lawsBrowsingHistoryService.removeByIds(Arrays.asList(map.get("ids").split(",")));
|
this.lawsBrowsingHistoryService.removeByIds(Arrays.asList(map.get("ids").split(",")));
|
||||||
return Result.OK(MessageUtils.getMessage(ResultCommon.SUCCESSFULLY_DELETED_IN_BULK));
|
return Result.OK(MessageUtils.getMessage(ResultCommon.SUCCESSFULLY_DELETED_IN_BULK));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user