权限时间调整
This commit is contained in:
parent
5d3a8905c2
commit
f074c4db94
@ -160,14 +160,14 @@ public class SimulationServiceImpl implements SimulationService {
|
|||||||
private List<PermissionSubjectVO> findCanUsedPermission(List<PermissionSubjectVO> newVOLIst, RtsMapFunctionVO functionVO, LoginUserInfoVO loginInfo){
|
private List<PermissionSubjectVO> findCanUsedPermission(List<PermissionSubjectVO> newVOLIst, RtsMapFunctionVO functionVO, LoginUserInfoVO loginInfo){
|
||||||
List<PermissionSubjectVO> canUseSubjectList = newVOLIst.stream().filter(d->Objects.equals(true,d.getForever())).collect(Collectors.toList());
|
List<PermissionSubjectVO> canUseSubjectList = newVOLIst.stream().filter(d->Objects.equals(true,d.getForever())).collect(Collectors.toList());
|
||||||
if(CollectionUtils.isEmpty(canUseSubjectList)){
|
if(CollectionUtils.isEmpty(canUseSubjectList)){
|
||||||
List<Long> timeOverIdList = newVOLIst.stream().filter(d->Objects.nonNull(d.getEndTime()) && d.getEndTime().isBefore(LocalDateTime.now()))
|
List<Long> timeOverIdList = newVOLIst.stream().filter(d->Objects.nonNull(d.getEndTime()) && d.getEndTime().isAfter(LocalDateTime.now()))
|
||||||
.map(d->d.getId())
|
.map(d->d.getId())
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
canUseSubjectList = newVOLIst.stream().filter(d->!timeOverIdList.contains(d)).collect(Collectors.toList());
|
|
||||||
if(CollectionUtils.isEmpty(timeOverIdList)){
|
if(CollectionUtils.isEmpty(timeOverIdList)){
|
||||||
log.error("mapId[{}],functionId[{}] userId[{}] 权限过期",functionVO.getMapId(),functionVO.getId(),loginInfo.getAccountVO().getId());
|
log.error("mapId[{}],functionId[{}] userId[{}] 权限过期",functionVO.getMapId(),functionVO.getId(),loginInfo.getAccountVO().getId());
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
canUseSubjectList = newVOLIst.stream().filter(d->!timeOverIdList.contains(d)).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
return canUseSubjectList;
|
return canUseSubjectList;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user