|
@@ -54,13 +54,13 @@ public class AppCameraService {
|
|
|
}
|
|
|
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);
|
|
|
-// }
|
|
|
- cameraAppVoList = cameraDetailService.getListByUserAndType(null,user.getCompanyId(), cameraType);
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ //cameraAppVoList = cameraDetailService.getListByUserAndType(null,user.getCompanyId(), cameraType);
|
|
|
for (CameraAppVo cameraApp : cameraAppVoList) {
|
|
|
UserIncrement userIncrementEntity = userIncrementService.getByCameraId(cameraApp.getId());
|
|
|
if(userIncrementEntity != null){
|
|
@@ -85,10 +85,8 @@ public class AppCameraService {
|
|
|
throw new BusinessException(AppConstant.FAILURE_CODE_4010, AppConstant.FAILURE_MSG_4010);
|
|
|
}
|
|
|
Set<Long> roleIds = userRoleService.getByUser(user);
|
|
|
- log.info("role:{}",roleIds);
|
|
|
if(!roleIds.contains(5L) && !roleIds.contains(6L) && !roleIds.contains(1L)){
|
|
|
Long countByUserId = cameraDetailService.getCountByUserId(user.getId());
|
|
|
- log.info("countByUserId:{}",countByUserId);
|
|
|
if(countByUserId >0){
|
|
|
throw new BusinessException(CameraConstant.FAILURE_CODE_6031, CameraConstant.FAILURE_MSG_6031);
|
|
|
}
|