|
@@ -128,6 +128,9 @@ public class AuthorizeCameraServiceImpl extends ServiceImpl<IAuthorizeCameraMapp
|
|
|
if(cameraDetail == null){
|
|
|
throw new BusinessException(ResultCode.CAMERA_SN_NOT_EXIST);
|
|
|
}
|
|
|
+ if(cameraDetail.getType() == 1){
|
|
|
+ throw new BusinessException(ResultCode.CAMERA_AUTHORIZE_ERROR);
|
|
|
+ }
|
|
|
camRegDto.setCameraType(cameraDetail.getType());
|
|
|
camRegs.add(camRegDto);
|
|
|
AuthorizeCameraDetail detail = new AuthorizeCameraDetail();
|
|
@@ -146,7 +149,7 @@ public class AuthorizeCameraServiceImpl extends ServiceImpl<IAuthorizeCameraMapp
|
|
|
param.setAuthorizeKey(authorizeKey);
|
|
|
}catch (Exception e){
|
|
|
log.info("授权相机:error:",e);
|
|
|
- throw new BusinessException(ResultCode.GET_MACHINE_CODE_ERROR);
|
|
|
+ throw e;
|
|
|
}
|
|
|
}
|
|
|
this.saveOrUpdate(param);
|