|
@@ -78,7 +78,7 @@ public class AppCameraService {
|
|
|
throw new BusinessException(AppConstant.FAILURE_CODE_4010, AppConstant.FAILURE_MSG_4010);
|
|
|
}
|
|
|
Set<Long> roleIds = userRoleService.getByUser(user);
|
|
|
- if(!roleIds.contains(5L) || !roleIds.contains(6L) || !roleIds.contains(1L)){
|
|
|
+ if(!roleIds.contains(5L) && !roleIds.contains(6L) && !roleIds.contains(1L)){
|
|
|
throw new BusinessException(CameraConstant.FAILURE_CODE_6005, CameraConstant.FAILURE_MSG_6005);
|
|
|
}
|
|
|
if(!user.getCompanyId().equals(cameraDetail.getCompanyId())){
|
|
@@ -115,11 +115,9 @@ public class AppCameraService {
|
|
|
}
|
|
|
|
|
|
Set<Long> roleIds = userRoleService.getByUser(user);
|
|
|
- log.info("roleIds:{}",roleIds);
|
|
|
- if(!roleIds.contains(5L) || !roleIds.contains(6L) || !roleIds.contains(1L)){
|
|
|
+ if(!roleIds.contains(5L) && !roleIds.contains(6L) && !roleIds.contains(1L)){
|
|
|
throw new BusinessException(CameraConstant.FAILURE_CODE_6005, CameraConstant.FAILURE_MSG_6005);
|
|
|
}
|
|
|
- log.info("user-companyId:{},camera-companyId:{}",user.getCompanyId(),cameraDetail.getCompanyId());
|
|
|
if(!user.getCompanyId().equals(cameraDetail.getCompanyId())){
|
|
|
throw new BusinessException(CameraConstant.FAILURE_CODE_6005, CameraConstant.FAILURE_MSG_6005);
|
|
|
}
|