|
@@ -52,7 +52,14 @@ public class AppCameraService {
|
|
if(user == null){
|
|
if(user == null){
|
|
throw new BusinessException(LoginConstant.FAILURE_CODE_3015, LoginConstant.FAILURE_MSG_3015);
|
|
throw new BusinessException(LoginConstant.FAILURE_CODE_3015, LoginConstant.FAILURE_MSG_3015);
|
|
}
|
|
}
|
|
- List<CameraAppVo> cameraAppVoList = cameraDetailService.getListByUserAndType(user.getCompanyId(), cameraType);
|
|
|
|
|
|
+ List<CameraAppVo> cameraAppVoList = new ArrayList<>();
|
|
|
|
+
|
|
|
|
+ Set<Long> roleIds = userRoleService.getByUser(user);
|
|
|
|
+ if(!roleIds.contains(5L) && !roleIds.contains(6L) && !roleIds.contains(1L)){
|
|
|
|
+ cameraAppVoList = cameraDetailService.getListByUserAndType(user.getId(),user.getCompanyId(), cameraType);
|
|
|
|
+ }else {
|
|
|
|
+ cameraAppVoList = cameraDetailService.getListByUserAndType(null,user.getCompanyId(), cameraType);
|
|
|
|
+ }
|
|
for (CameraAppVo cameraApp : cameraAppVoList) {
|
|
for (CameraAppVo cameraApp : cameraAppVoList) {
|
|
UserIncrement userIncrementEntity = userIncrementService.getByCameraId(cameraApp.getId());
|
|
UserIncrement userIncrementEntity = userIncrementService.getByCameraId(cameraApp.getId());
|
|
if(userIncrementEntity != null){
|
|
if(userIncrementEntity != null){
|